Article

SLOs, error budgets and rollback runbooks for frontend teams

Pick SLIs for a storefront, define SLOs and burn-rate alerts in Datadog, and give each team a runbook that ends in a rollback per market.

Published Updated 6 min read

This guide helps frontend teams set up SLOs that lead to action. It covers the choice of SLIs, the SLO types in Datadog, burn-rate alerts, a runbook template and the team habits that keep it all current. It is written for tech leads of web teams that run a storefront in several markets. The Terraform examples use the DataDog/datadog provider 4.32.0, the current version on 1 December 2026.

Pick SLIs that users notice

An SLI is a measurement of what users experience. Start with three or four, because more SLIs make alerts harder to read.

SLI Source in Datadog Good result
5xx error rate APM trace metric trace.web.request.hits.by_http_status A request without a 5xx status
Availability Synthetic tests of the main journeys A test run that passes
Latency (TTFB) APM latency distribution trace.web.request, or synthetics.http.firstbyte.time A response under your threshold
Core Web Vitals RUM metrics such as rum.measure.view.largest_contentful_paint p75 under the web.dev threshold

In a Node.js service traced with dd-trace, the HTTP server span is called web.request. Datadog computes trace metrics on 100% of the traffic, before sampling, which makes them a good base for an error-rate SLI. However, trace metrics carry only a few tags: env, service, version, resource, the status and your primary tags. Span tags are not on them, so for an SLO per market, use a separate service per market or a second primary tag.

The Core Web Vitals thresholds on web.dev are an LCP of 2.5 seconds, an INP of 200 milliseconds and a CLS of 0.1, each measured at the 75th percentile.

Choose the SLO type

Datadog has three SLO types:

Type How it counts Burn-rate alerts
Metric-based Good events and bad events from a metric query Yes
Monitor-based Uptime of up to 20 monitors Only when it uses metric monitors
Time slice Good minutes, from a condition on a metric query Yes

An SLO uses a rolling window of 7, 30 or 90 days, and its target must be below 100%. The error budget is 100% minus the target, so with a target of 99.5%, the budget is 0.5%.

Monitor-based SLOs on synthetic tests cannot use burn-rate or error-budget alerts, so alert on the synthetic tests themselves and use the SLO for the trend and the report. Also note that a monitor-based SLO counts a monitor in WARN state as up.

For the synthetic test alerts, page the on-call engineer when a critical journey such as the home page, search or the cart fails, but send slow degradation to the team channel instead. Run these tests from several locations, and use dedicated test products and test accounts so that a test does not fail when stock or content changes.

Define the 5xx SLO in Terraform

This metric-based SLO counts requests with and without a 5xx status:

terraform {
  required_providers {
    datadog = {
      source  = "DataDog/datadog"
      version = "~> 4.32"
    }
  }
}

resource "datadog_service_level_objective" "storefront_5xx" {
  name        = "Storefront: requests without 5xx"
  type        = "metric"
  description = "Share of storefront requests that do not return a 5xx status."

  sli_specification {
    count {
      good_events_formula = "query1"
      bad_events_formula  = "query2"

      queries {
        metric_query {
          name  = "query1"
          query = "sum:trace.web.request.hits.by_http_status{env:prod,service:storefront-web,!http.status_class:5xx}.as_count()"
        }
      }

      queries {
        metric_query {
          name  = "query2"
          query = "sum:trace.web.request.hits.by_http_status{env:prod,service:storefront-web,http.status_class:5xx}.as_count()"
        }
      }
    }
  }

  thresholds {
    timeframe = "30d"
    target    = 99.5
    warning   = 99.8
  }

  timeframe         = "30d"
  target_threshold  = 99.5
  warning_threshold = 99.8

  tags = ["team:web-checkout", "service:storefront-web"]
}

Note that the warning value must be higher than the target, and that the team: tag connects the SLO to a team in Datadog.

Add burn-rate alerts

The burn rate shows how fast you use the error budget: a burn rate of 1 uses the whole budget in exactly one SLO window. Datadog recommends these starting values for a 30-day SLO:

Burn rate Long window Short window Budget used
14.4 1 hour 5 minutes 2%
6 6 hours 30 minutes 5%
3 24 hours 2 hours 10%

The alert fires only when the burn rate reaches the threshold in both windows, and the short window lets the monitor recover soon after the problem ends. The Google SRE workbook pages on the first two and opens a ticket for the slow burn.

As a worked example, take a target of 99.5%, which gives a budget of 0.5%. A burn rate of 14.4 then means that 7.2% of requests return a 5xx, and at that rate the 30-day budget is gone in about two days.

resource "datadog_monitor" "storefront_5xx_fast_burn" {
  name    = "Storefront 5xx SLO: fast burn"
  type    = "slo alert"
  query   = "burn_rate(\"${datadog_service_level_objective.storefront_5xx.id}\").over(\"30d\").long_window(\"1h\").short_window(\"5m\") > 14.4"
  message = <<-EOT
    The storefront uses its 5xx error budget 14.4 times too fast.
    Follow the runbook before you change anything. @team-web-checkout
  EOT

  monitor_thresholds {
    critical = 14.4
  }

  assets {
    category = "runbook"
    name     = "Storefront 5xx runbook"
    url      = "https://wiki.example.com/runbooks/storefront-5xx"
  }

  tags = ["team:web-checkout"]
}

@team-web-checkout sends the alert to the channel of that team in Datadog, and the assets block puts the runbook link on the monitor.

Latency and Core Web Vitals as time slice SLOs

A time slice SLO checks a condition per slice of 1 or 5 minutes and counts a slice as good when the condition holds, which means you need no separate monitor.

Use it for latency and Core Web Vitals: for example, a 5-minute slice is good when the p75 of rum.measure.view.largest_contentful_paint stays under 2.5 seconds. Datadog computes the RUM metrics on all ingested sessions. Check the unit of the metric in the Metrics Summary before you set a threshold. Use 5-minute slices for markets with little traffic, so that a few slow sessions do not mark a slice as bad.

Web vitals move slowly, so let a Core Web Vitals SLO open a ticket rather than a page.

Write a runbook for each alert

An alert without a runbook leaves the on-call engineer to guess. The team that owns the alert writes the runbook and keeps it short enough to read during an incident. This template covers one alert:

# Runbook: <service>, <SLO or monitor name>

## Trigger
- Monitor: <name and link>
- Condition: <for example, burn rate above 14.4 over 1h and 5m>
- Severity: <page or ticket>

## Owner
- Team: <team handle in Datadog>
- On call: <rotation or channel>
- Escalation: <next person or team after 15 minutes>

## First checks (first 10 minutes)
1. Which markets are affected? Filter the dashboard on the market.
2. Did a deploy, feature flag or CDN change happen in the last hour?
3. Do the synthetic tests for the affected markets fail?
4. Do the errors come from one route, one dependency or everywhere?
5. Is the legacy storefront healthy for the same market?

## Dashboards
- Service overview: <link>
- New and legacy storefront per market: <link>
- Synthetic test results: <link>

## Decision to roll back
Roll back the market when one of these is true:
- The fast burn-rate alert fires and no fix is ready within 30 minutes.
- Cart or checkout tests fail in the market for 2 runs in a row.
- <team-specific condition>
Who decides: <role>

## Rollback steps per market
1. Announce the rollback in <incident channel>.
2. Switch the market back: <CDN or flag command with the market key>.
3. Purge the cache for the market: <command>.
4. Record the switch as an event in Datadog.
5. Confirm that the synthetic tests pass and the 5xx rate is back to normal.

## Communication
- Internal: <channel>, an update every 30 minutes until resolved.
- Business: <market managers, customer service>.
- Status page: <yes or no, and who updates it>.

## Follow-up
- Postmortem within <number> working days.
- Add the cause and the fix to the shared backlog of non-functional requirements.
- Update this runbook.

Roll back per market

A rollback per market needs a switch per market, and in a market-by-market migration, that switch often sits in the CDN. On Fastly, an edge dictionary with one entry per market is one way to build that switch. Write the exact command for each market in the runbook, and practise the rollback once before a market goes live.

Keep one backlog of non-functional requirements

SLOs and runbooks compete with features for time, so put them in one backlog that all teams share. Sort it by pillar, such as security, performance, resilience and observability, and give each pillar one epic. Use one shared label so that the items show on the board of every team.

Show planned, in-progress and done items on one page, so that nobody needs a status meeting to see progress. Each SLO and each runbook is a backlog item with one owning team.

Name a performance champion in each team

A performance champion is an engineer who watches the SLOs, dashboards and web vitals of the team. The champion reviews new runbooks, keeps the dashboards current and brings findings to the shared backlog. The on-call engineer still handles the alerts, while the champion keeps the standard in the team.

In practice

An international cosmetics retailer moved from Salesforce Commerce Cloud to a headless Next.js platform, market by market. We partnered with the client’s architecture team and supported its 7 product teams, 5 on web and 2 on the app.

From January to June 2026, all 7 teams got team ownership in Datadog, along with standard dashboards, monitors and synthetic tests. We set up the shared backlog of non-functional requirements, sorted by pillar with security, performance and resilience first. From that backlog, the teams wrote SLO and rollback runbooks for each market. In the same planning increment, the 5xx error rate fell from 0.10% to 0.024% and all synthetic tests passed. Each team has a performance champion. Read the full case study.

Checklist

  • Pick three or four SLIs that users notice.
  • Base the 5xx SLI on trace metrics.
  • Use metric-based or time slice SLOs where you need burn-rate alerts.
  • Alert on synthetic tests directly.
  • Start with burn rates of 14.4 and 6 for pages, and 3 for tickets.
  • Tag every SLO and monitor with team:<handle>.
  • Link a runbook on every monitor.
  • Write the rollback command for each market.
  • Keep SLO and runbook work in one shared backlog.
  • Name a performance champion in each team.

For a review of your SLOs and alerts, see the frontend observability assessment.

Sources

Let's connect

Talk about your project

Tell us about your team and your problem. In 30 minutes we find out whether one of our offers fits, and if none does, we tell you.

Book a 30-minute call