Creating a Datadog SLO for Latency and Configuring Burn‑Rate Alerts
Step‑by‑step guide to define a latency‑based SLO, set up automatic error‑budget tracking, and verify burn‑rate alerts in Datadog.
06 Feb 2026, 18:09 UTC

Desired Outcome
Create a Service Level Objective (SLO) that measures the percentage of requests with latency under 200 ms over a rolling 7‑day window, and configure burn‑rate alerts that notify the team when the error budget is being consumed too quickly.
Prerequisites
- A Datadog organization with access to the
Monitors,SLOs, andAlertsmodules. - User role that allows creating monitors, SLOs, and alert policies (typically
Adminor a custom role withslo_writeandmonitor_writepermissions). - An existing monitor or metric query that captures request latency (e.g., a Datadog APM latency monitor or a custom metric from
http.server.latency).
Procedure
-
Identify or create the latency query
If you already have a monitor that alerts on latency >200 ms, note its query ID. Otherwise, create a monitor:
# Example: create a monitor via the Datadog API (run in a terminal with API & APP keys) curl -X POST "https://api.datadoghq.com/api/v1/monitor" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: " \ -H "DD-APPLICATION-KEY: " \ -d '{ "type": "metric alert", "query": "avg(last_5m):avg:http.server.latency{*} > 200", "name": "Latency >200ms (5‑min avg)", "message": "Latency exceeded 200 ms on {{host.name}}.", "tags": ["service:frontend"], "options": { "thresholds": { "critical": 200 } } }'Save the monitor ID returned in the response (e.g.,
123456). -
Create the SLO from the monitor
- In the Datadog UI, navigate to Monitors → Manage Monitors, locate the monitor you just created, and click its name.
- On the monitor detail page, click Create SLO (or go to Service Level Objectives → New SLO and select Monitor-based).
- Select the monitor (by ID or name) as the source.
- Set the Target to
99.9% (meaning 99.9% of evaluations must be ok, i.e., latency ≤200 ms). - Choose a Time window of
7d(rolling). - Provide a clear name, e.g.,
frontend_latency_slo, and optionally add tags liketeam:frontend. - Click Create SLO.
-
Configure burn‑rate alerts
- From the SLO list (Service Level Objectives), open the newly created SLO.
- In the SLO detail view, click Create Burn‑rate Alert.
- Choose an alert condition; a common starting point is:
- Burn rate >
1.0 over1h (i.e., consuming the error budget faster than expected). - Set the notification channels (e.g., Slack, email, PagerDuty).
- Provide a descriptive alert name, such as
frontend_latency_slo_burnrate_1h. - Save the alert.
-
Link the SLO to a dashboard (optional but recommended)
- Open or create a dashboard where you want to display reliability metrics.
- Add a SLO widget and select the SLO you just created.
- Optionally add a Burn‑rate widget to visualize consumption over time.
- Save the dashboard.
Expected Checks
- After creation, the SLO appears in the Service Level Objectives list with a status of OK or Warning based on recent data.
- The SLO detail page shows:
- Current compliance percentage (should be close to 100 % if latency is good).
- Error budget remaining (e.g., 0.1 % of the 7‑day window).
- Burn‑rate graph with the alert threshold visible.
- If you generate latency spikes (e.g., by injecting delay in a test service), the burn‑rate should rise and the configured alert should fire after the defined evaluation period (e.g., 1 hour). Verify receipt in your notification channel.
- The dashboard widgets update in near‑real time reflecting the SLO and burn‑rate values.
Recovery Options
If the SLO or its underlying monitor needs to be changed:
- Edit the monitor: Changing the monitor query does not> automatically update the SLO. After editing, open the SLO and click Edit to reselect the monitor or adjust the query.
- Adjust the SLO target or window: Use the Edit SLO button to modify the target percentage or time window; note that this will recalculate the error budget from the start of the new window.
- Delete the SLO: If the SLO is no longer needed, select it in the list and choose Delete. This removes associated burn‑rate alerts unless they are manually retained.
- Rollback alert changes: Burn‑rate alerts can be edited or deleted from the Monitors → Manage Monitors view (they appear as regular metric alerts).
Always verify after any change that the SLO still reflects the intended latency target and that alerts fire as expected.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.