Docs/Tools/Datadog

Datadog

Connect Datadog to DevStats to automatically sync incidents and feed your Change Failure Rate (CFR) and Mean Time to Recovery (MTTR) metrics.

Prerequisites

Before connecting, you need two Datadog credentials and the correct site for your organization.

API Key

  1. In Datadog, go to Organization Settings > API Keys.
  2. Click New Key, give it a name (e.g. DevStats), and copy the generated value.

Application Key

  1. In Datadog, go to Organization Settings > Application Keys.
  2. Click New Key, give it a name (e.g. DevStats), and copy the generated value.
Scope Description
incident_read Required. Without this scope, DevStats rejects the connection with a permission error.

If you see a "missing scope" error during setup, edit the application key in Datadog and confirm that incident_read is enabled.

Site / Region

Choose the Datadog site that matches where your organization's data is hosted:

Site Region When to use
US1 (default) United States Most accounts, created at app.datadoghq.com
EU Europe Accounts created at app.datadoghq.eu
US3 United States 3 Accounts created at us3.datadoghq.com
US5 United States 5 Accounts created at us5.datadoghq.com
AP1 Asia-Pacific Accounts created at ap1.datadoghq.com

You can confirm your site by checking the URL you use to access Datadog.

Connecting Datadog

Step 1: In DevStats, go to Settings > Incidents. Select Datadog as the data source.

Step 2: Enter your API Key, Application Key, and choose the correct Site / Region. Click Connect to validate the credentials.

Validation errors

Error Cause Solution
Invalid credentials API Key or Application Key is incorrect Verify both keys in Datadog
Missing scope Application Key does not have incident_read Edit the key in Datadog and add the scope
Connection failure Network or firewall issue Check connectivity to the Datadog API endpoint for your site

After validation, DevStats saves the credentials and opens the Setup Wizard.

Setup Wizard

The wizard runs immediately after connecting and configures which incidents will be synced and how to map them to your squads.

Step 1 — Severities

DevStats lists all severity levels available in your Datadog account. Select which ones should be synced as incidents in DevStats.

Datadog Severity DevStats Severity
SEV-1 Critical
SEV-2 High
SEV-3 Medium
SEV-4 Low
SEV-5 Low
UNKNOWN Low

Only incidents matching the selected severities will be synced. You can change this selection at any time in the integration settings.

Step 2 — Services and Teams Mapping

Incidents in Datadog belong to services and teams. This step lets you map each service/team to a squad in DevStats.

  1. DevStats fetches all services and teams from your Datadog account.
  2. For each squad in DevStats, select which Datadog services and/or teams should be mapped to it.
  3. Click Save mapping to complete the wizard.

Incidents belonging to unmapped services or teams are still synced, but will not be assigned to any squad and will not appear in CFR/MTTR breakdowns by squad. You can update the mapping at any time.

What Gets Synced

Sync frequency

DevStats runs an automatic sync once per day for each workspace with a complete Datadog configuration. A sync is also triggered immediately when you save a mapping change or rotate credentials.

What is collected

  • All incidents matching the selected severities.
  • The status of the incident at the time of sync.
  • The incident timestamps: creation date and resolution date.
  • The incident services and teams, used to resolve the associated squads.

Status mapping

Datadog Status DevStats Status
active Investigating
stable Mitigated
resolved Resolved

Squad and repository resolution

When an incident is synced, DevStats looks up the incident's services and teams in the configured mapping, associates the matching squads, and links all repositories belonging to those squads. This connection links an incident to the deploys that may have caused it, enabling CFR calculation.

How Incidents Feed CFR and MTTR

Change Failure Rate (CFR)

CFR = incidents in period / deploys in period

An incident contributes to the CFR of all repositories linked to its associated squads.

Mean Time to Recovery (MTTR)

MTTR = resolved_at − created_at

Incidents without resolved_at are excluded from MTTR until they are resolved.

Editing the Integration

Go to Settings > Incidents > Datadog to update the integration at any time.

Rotating credentials

  1. Enter the new API Key and/or Application Key.
  2. Optionally change the Site / Region.
  3. Click Test connection to validate without saving.
  4. Click Save to apply the changes.

Updating severities

Go to the Severities section and enable or disable the desired levels. Changes apply on the next sync.

Updating the mapping

Go to the Mapping section, adjust the squads, and save. The next sync will use the updated mapping.

Disconnecting Datadog

  1. Go to Settings > Incidents > Datadog.
  2. Click Disconnect and confirm.

What is removed: API Key, Application Key, severity configuration, and services/teams mapping.

What is kept: all incidents already synced to DevStats. Historical data is never deleted.

After disconnecting, no new incidents will be collected from Datadog. You can reconnect at any time.