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. Click the Profile & Account Settings icon and select Connected Services.
    datalog-connected-services.png
  3. In Connect a Service, select Connect Datadog.
    A new page Connect Datadog opens.
  4. Select your 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. Select Connect Account.

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.

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 other 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
  • Data iterations passed/failed/defined
  • Requests executed
  • 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 from Account or Test

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

Follow these steps for disconnecting Datadog from your account:

  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.

To disconnect Datadog from a specific test:

  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 OFF.