Pcornel
Observability

SLI, SLO & Error Budgets

Cheat sheet · https://pcornel.dk/topic.php?topic=6108

Back to the Topic

Answer

An SLI measures service behaviour that users care about (e.g. share of successful requests); an SLO sets a target over a window (99.9 % over 30 days); the error budget is the allowed unreliability (0.1 %).

Remember

Measure at the user edge. Choose a few SLIs per service. Alert on error budget burn rate, not on every blip.

First checks

  • sum(rate(http_requests_total{code!~"5.."}[30d])) / sum(rate(http_requests_total[30d])) — first check for this topic
  • curl -s localhost:9090/-/ready — Prometheus ready
  • curl -s 'localhost:9090/api/v1/query?query=up' — scrape targets up/down
  • promtool check config prometheus.yml — config valid

Verify in this order

user requests → SLI → compared with SLO → error budget → decisions

Where it usually breaks

Common failures are measuring infrastructure uptime instead of user outcomes, changing denominators silently, excluding failures through missing telemetry, using tiny windows for long SLOs and confusing contractual SLA penalties with internal SLO engineering targets.

SLI, SLO & Error Budgets verification boundary matrix

BoundaryInspectHealthy interpretationDo not infer
IntentService level indicatorsIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeService level objectives / Availability/latency/error-rate signalsOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateBurn rateIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeError budget conceptsThe original bounded check succeeds in the same time windowProduction correctness outside this scope

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6108

Confirmation

Confirm action

Continue?