Datadog Integration with API Monitoring

Datadog provides a monitoring platform that tracks and scales with your dynamic cloud infrastructure. When connected with your API Monitoring account, you can create Events and Metrics to use in your Datadog dashboards and alerts.

Important: To enable the Datadog Integration, slide the 3rd Party Integration Toggle ON for each test that you want to integrate. Expand the Test Settings drop-down list and scroll down to the Integrations section.

Integrate Your Datadog Account with API Monitoring

Follow these steps:

  1. From your Datadog account, Create an API Key and copy it to your clipboard.
  2. Go to API Monitoring,Tests.
  3. In the Connect Runscope with Your Workflow section, click Datadog.
    connect-runscope-with-workflow.png
    A new page Connect Datadog opens.
  4. Select Region.
  5. In the API Key field, enter the generated Datadog API Key.
  6. (Optional) Check the box for the following options:
    Send events for completed test runs.
    Send metrics on all API test runs and individual test requests.
  7. Click Connect Account.
    The Datadog service is now visible on your list of Connected Services. To view the list, click the Profile & Account Settings icon and select Connected Services.
    datalog-connected-services.png
  8. Slide the 3rd Party Integration Toggle ON for each test you want to integrate.

Connect Datadog to Individual Tests

If you need different Datadog settings for individual tests (for example, send events on some test runs and metrics on others), you can go through the connection process multiple times and enable each individual connected service on a per-test or per-bucket basis.

Follow these steps:

  1. Select a test and click Edit Test.
  2. Expand the Test Settings drop-down list and scroll down to the Integrations section.
    The available integrations are shown.
  3. For Enable Integrations with 3rd party services, toggle the slider for Datadog ON.
  4. Click Connect Datadog.
  5. Select Region.
  6. In the API Key field, enter the generated Datadog API Key.
  7. (Optional) Check the box for the following options:
    Send events for completed test runs.
    Send metrics on all API test runs and individual test requests.
  8. Click Connect Account.

Events

When the option to create Datadog Events is selected, a new event will be created for each test run. The event will be tagged with the bucket, team and test information.

Metrics

When the option to create Datadog Metrics is enabled, metrics will be created for the test run as a whole, along with each individual request step within a test.

RunscopeTestRun

  • Total assertions passed/failed/defined
  • Total variables passed/failed/defined
  • Total scripts passed/failed/defined
  • Total response time (ms) for all requests
  • Pass/fail counter (either 1 or 0)

RunscopeTestRequest

  • Assertions passed/failed/defined
  • Variables passed/failed/defined
  • Scripts passed/failed/defined
  • Response time (ms)
  • Response body size (bytes)
  • Response status code

Each test run and request metric will be tagged with information about the test, environment, bucket and team. Additionally, test run metrics are tagged with the status of the run while test request metrics are tagged with the requested URL and HTTP method.

Disconnect Datadog

You can disconnect Datadog at any time by disconnecting the service in your team settings.

Follow these steps:

  1. In API Monitoring, click the Profile & Account Settings icon on top-right.
  2. Select Connected Services.
  3. Select the Datadog connection that you want to remove and click Disconnect.

The Datadog connection is removed from the list of connected services.