Writing an SLO Document
An SLO that lives only in a Prometheus rule is a number without a reason. The SLO document records what the service is, which SLIs were chosen and why, the targets, the exclusions, who approved it and when it will be reviewed. It's the reference for every later argument ("why don't 404s count?") and the input for the alert rules.
Template
# SLO: <service> — <journey>
| | |
|---|---|
| Service owner | <team>, <on-call rotation> |
| Approvers | <engineering lead>, <product lead>, <SRE lead> |
| Status | draft / agreed on <date> |
| Next review | <date, at most a quarter away> |
## Service overview
What the service does, who its users are, which journeys matter most. A diagram of the request path, showing
where the SLIs are measured.
## SLIs and SLOs
| SLI | Good event | Valid event | Measured at | SLO | Window |
|---|---|---|---|---|---|
## Rationale
Why these targets: the SLI's history, user expectations, dependency SLOs, cost.
## Exclusions
Each excluded class of requests and the reason.
## Error budget
Size in requests and in full-outage minutes; link to the error budget policy.
## Alerting
The burn-rate alerts that protect each SLO and where they route (page / ticket).
## Dependencies
Each dependency, its SLO, and what happens to us when it fails.
## Change log
<date>: <change> (<who>, <why>)A worked example
# SLO: TAD Market — checkout
| | |
|---|---|
| Service owner | payments team, rotation "payments-primary" |
| Approvers | A. Okafor (eng), L. Chen (product), M. Rossi (SRE) |
| Status | agreed on 2026-03-02 |
| Next review | 2026-06-01 |
## Service overview
`POST /checkout` turns a cart into an order and charges the card through the payment provider. About 6
requests per second at peak, 2.5 million per 28 days. Measured at the ingress gateway (Envoy access metrics).
## SLIs and SLOs
| SLI | Good event | Valid event | Measured at | SLO | Window |
|---|---|---|---|---|---|
| availability | status < 500 and not 429 | all POST /checkout except load tests | gateway | 99.9% | 28 d rolling |
| latency | available and completed in <= 800 ms | as above | gateway histogram | 99% | 28 d rolling |
## Rationale
The last 90 days delivered 99.95% availability and 99.4% under 800 ms. Support tickets rise noticeably when the
checkout error rate exceeds about 0.5% for more than a few minutes. The payment provider's own SLA is 99.95%.
99.9% leaves room for two or three bad deploys a month.
## Exclusions
- requests with the header `x-load-test: 1` (our k6 runs);
- 4xx except 429: they are user errors (expired cart, invalid card), shown and handled in the UI.
Card declines (402) are business outcomes, not failures.
## Error budget
2,500 failed requests per 28 days (≈ 40 minutes of full outage). Policy: "Error budget policy: checkout".
## Alerting
Multi-window multi-burn-rate alerts: page at 14.4x (1 h / 5 min) and 6x (6 h / 30 min), ticket at 3x (1 d / 2 h)
and 1x (3 d / 6 h). Rules and tests: `slo/checkout-rules.yml`, `slo/checkout-test.yml`.
## Dependencies
| Dependency | Its SLO | If it fails |
|---|---|---|
| payment provider | 99.95% (SLA) | checkout fails; orders are saved as "pending payment" and retried |
| orders database | 99.95% | checkout fails |
| recommendations | none | hidden on the confirmation page (graceful degradation) |
## Change log
2026-03-02: first version (M. Rossi, from the Q1 reliability review)Note: Keep the latency SLO's threshold on a histogram bucket boundary (here 0.8 s). A threshold between two buckets can't be computed exactly from a Prometheus histogram; see Latency SLOs from Histograms.
Keep the numbers machine-readable
Alert rules, dashboards and reports should all be generated from one source, not copied by hand. Many teams store
the SLOs as YAML next to the document (tools such as Sloth, Pyrra and OpenSLO define formats for it; see the
Toolkit). The session keeps a minimal spec and uses yq to print the budget table that goes into
the document, so the document and the rules can't drift apart:
cat > slos.yaml <<'YML'
service: checkout
requests_per_28d: 2500000
slos:
- name: availability
objective: 99.9
- name: latency-800ms
objective: 99.0
YML
yq '.slos[] | [.name, .objective] | @tsv' slos.yaml |
while IFS=