Reliability and security · L1Observability, SLOs and error budgets

Observability, SLOs and error budgets

Logs, metrics and traces show what your system does. SLOs and error budgets tell you when to act.

L1 Must-knowReliability and security15 min read
Fact-checked by AI against cited sources · Human review pendingLast reviewed 21 Oct 2026 · How we check content
Senior at work · lesson 8 of 26
Section 1 of 8

What broke

A made-up story to show a common failure. Not about a real company.

Meera's team runs the checkout API for an online shop. Their dashboard has 40 graphs. On Tuesday evening, every graph looks fine. Average latency is 120 ms. CPU is at 45%.

At the same time, one in ten customers cannot pay. A new release broke payments for one card type. Those requests fail fast, so they even pull the average latency down.

Nobody is paged. The team gets 200 alerts a week about CPU and disk, so they have learned to ignore the alert channel. The problem is found the next morning, from angry messages to support.

The team had a lot of data, but no clear answer to one question: "Are our users getting what they need right now?" (This story is made up, but the pattern is common.)

Section 2 of 8

The idea in simple words

Observability means you can understand what your system is doing from the data it sends out. Most of that data comes in three kinds. OpenTelemetry lists these three, plus other signals such as baggage, which carries context between them 1:

  • Metrics: numbers measured over time, like requests per second or error rate. Cheap to keep, good for graphs and alerts.
  • Logs: a record of one event, like "payment 7f3a failed: card declined". Rich in detail, but large.
  • Traces: the path of one request through many services. A trace is made of spans, one for each step, with its timing.

Data alone does not tell you when to act. For that you need a target that matches what users feel:

  • An SLI (service level indicator) is a measure of service, best written as good events ÷ total events 6. In practice, count only valid events: leave out calls like health checks. For example: the share of checkout requests that succeed in under 500 ms.
  • An SLO (service level objective) is the target for that SLI over a time window. For example: 99.9% over a rolling 4 weeks 6. The alerting maths below uses a 30-day window instead, as the alerting chapter does 7.
  • An SLA (service level agreement) is a contract with customers that has a penalty, often money, if you miss it 3.

The error budget is the part you are allowed to fail: 100% minus the SLO 6. With a 99.9% SLO and 1 million requests, you can fail 1,000 of them.

The key idea. Never aim for 100%. It is not realistic 3. A user on a phone that works 99% of the time cannot tell 99.99% from 99.999% 4. Pick a target, then spend the error budget on purpose. When some budget is left, ship. When it is gone, fix reliability first 4.

Section 3 of 8

How it works

Availability maths: the nines

Each extra "nine" cuts the allowed downtime by 10 5:

  • 99%: about 7.2 hours a month.
  • 99.9%: about 43 minutes a month.
  • 99.99%: about 4.3 minutes a month.
  • 99.999%: about 26 seconds a month.

Services that depend on each other multiply. If checkout needs three services in a row, each 99.9%, the best it can do is 0.999 × 0.999 × 0.999 ≈ 99.7%. This assumes they fail independently. Two copies in parallel help: if each copy is 99% and they really fail independently, both are down only 0.01 × 0.01 = 0.01% of the time. In real life, copies often fail together, for example after one bad config change.

What to measure

Google's SRE book suggests four golden signals for any service: latency, traffic, errors and saturation (how full the service is) 2. It also warns that averages hide slow requests. A service with an average latency of 100 ms can still have 1% of requests take 5 seconds 2. So use percentiles, like p99, in your SLIs.

Burn-rate alerts

The burn rate is how fast you spend the error budget, compared with the speed that would use it up exactly at the end of the window 7. At burn rate 1, the budget lasts 30 days. At burn rate 10, it is gone in 3 days 7.

Step through a bad deploy and see how a burn-rate alert reacts. Use Next and Back, or the ← and → keys.

An error budget during a bad deploy, with a burn-rate alertSLO: 99.9% OK over 30 days100 M requests → budget 100,000 errors Normal day: 0.05% errorsburn rate 0.5 · budget would last 60 days Bad deploy: 1.44% errorsburn rate 14.4 · budget gone in 2 days Page: 1 h and 5 min both ≥ 14.41 hour used 2% of the budget Roll back: errors stop5 min window drops → alert clears✓ the incident cost 2% of budget SeniorPath
  1. The checkout SLO is 99.9% of requests succeed over 30 days. With about 100 million requests in that time, the error budget is 0.1%: 100,000 failed requests.
  2. On a normal day, 0.05% of requests fail. That is half the allowed rate, so the burn rate is 0.5. At this speed the budget would last 60 days. No alert.
  3. A bad deploy makes 1.44% of requests fail. The burn rate is 1.44 ÷ 0.1 = 14.4. If nothing changes, the whole 30-day budget is gone in about 2 days.
  4. After about an hour, the burn rate is at least 14.4 over the last hour and over the last 5 minutes. Both windows agree, so the alert pages the on-call engineer. That hour used 2% of the budget, about 2,000 errors.
  5. The engineer rolls back. Errors drop, the 5-minute window falls below 14.4 and the alert stops within minutes. The incident cost only about 2% of the budget, so the team can keep shipping after they fix the bug.
Step 1 of 5

The Site Reliability Workbook recommends three alerts for a 99.9% SLO 7:

  • Page if the burn rate is above 14.4 over the last hour and the last 5 minutes. That is 2% of the 30-day budget in one hour.
  • Page if it is above 6 over the last 6 hours and the last 30 minutes. That is 5% of the budget.
  • Open a ticket if it is above 1 over the last 3 days and the last 6 hours. That is 10% of the budget.

The long window proves the problem is real. The short window makes the alert stop a few minutes after the problem stops 7.

Section 4 of 8

Trade-offs

ApproachCatches real user pain?NoiseUse it when
Alert on causes (CPU, disk, memory)No Users can suffer while CPU is fine.High. Many alerts need no action.Only as tickets or dashboards, to help find a cause.
Alert on any errorYes , but too early.Very high. Every short error pages someone.Almost never for paging.
Simple SLO threshold (error rate above 0.1% for 10 minutes)Yes Medium. Short spikes can still page.A first step, while you learn your traffic.
Multiwindow, multi-burn-rate SLO alertsYes Fast for big outages, slower for small, steady error rates.Low.Most user-facing services, once SLOs exist.

Simple rule: page a human only for symptoms that users feel. Keep cause metrics for debugging 2.

Section 5 of 8

At work: how a senior uses this

  • Start from the user's journey: "Can a customer pay?" Write the SLI as good events ÷ valid events. Then add the SLO.
  • Choose the SLO with the product owner. Use past data, and do not promise more than your dependencies give you.
  • Write an error budget policy before you need it. For example: if the budget for 4 weeks is spent, stop feature launches and work on reliability until the service is back within the SLO 6.
  • Put a trace ID in every log line. Then you can jump from a slow trace to the logs of that exact request.
  • Keep monitoring separate from what it watches. In 2021, Roblox was down for 73 hours, and its monitoring depended on Consul, the system that was failing. That slowed the team's diagnosis 8. Slack's dashboards and alerts also failed in its January 2021 outage, because they reached their databases through the overloaded network 9.
  • Delete or fix every alert that pages without needing action. Alert noise trains people to ignore the real alert.
Section 6 of 8

With AI

What to ask the agent

"Write a Prometheus recording rule for the checkout SLI: the share of requests that return a non-5xx status in under 500 ms. Then write burn-rate alerts for a 99.9% SLO, with 1 hour and 5 minute windows at 14.4, and 6 hour and 30 minute windows at 6."

"Add OpenTelemetry tracing to this HTTP handler. Add the trace ID to every log line it writes."

What to check yourself

  • The SLI counts only valid requests. Decide on purpose whether health checks and 4xx errors from bad user input count.
  • The burn-rate maths matches your SLO. A burn rate of 14.4 for a 99.9% SLO means an error rate of 1.44%.
  • Each alert uses both a long and a short window.
  • The latency SLI uses a percentile or a threshold count, never an average.
  • Logs do not contain passwords, card numbers or other personal data.
Section 7 of 8

Check yourself

1. Your SLO is 99.9% of requests succeed over 30 days. You serve 10 million requests in that time. How many failed requests can you afford?

Show answer

10,000 The error budget is 100% − 99.9% = 0.1%. 0.1% of 10 million is 10,000.

2. What does a burn rate of 1 mean?

Show answer

The error budget will run out exactly at the end of the SLO window. Burn rate compares how fast you spend the budget with the speed that would use it up exactly at the end of the window.

3. A checkout needs three services, one after another. Each is 99.9% available, and they fail independently. What is the best availability checkout can have?

Show answer

About 99.7% 0.999 × 0.999 × 0.999 ≈ 0.997. Every service in the chain adds its own failures.

4. Which alert is most likely to page on real user pain, and not on noise?

Show answer

The error budget is burning 14.4 times too fast over both the last hour and the last 5 minutes. It measures what users feel, and the two windows stop it from firing on short problems or long after the problem ends.

5. About how much downtime does 99.9% availability allow in a 30-day month?

Show answer

About 43 minutes 0.1% of 30 days is 43.2 minutes. Each extra nine divides the allowed downtime by 10.

Your progress is saved only in this browser. Export it to keep it safe.

Was this clear?
Report a mistake (opens GitHub in a new tab)
Section 8 of 8

Go deeper

Show 9 sources and related lessons
  1. OpenTelemetry documentation: Signals (opens in a new tab)
    Short definitions of traces, metrics, logs and baggage in the most widely used open standard.
  2. Google, Site Reliability Engineering, chapter 6: Monitoring Distributed Systems (opens in a new tab)
    The four golden signals, and why averages hide slow requests.
  3. Google, Site Reliability Engineering, chapter 4: Service Level Objectives (opens in a new tab)
    What SLIs, SLOs and SLAs are, and why 100% is the wrong target.
  4. Google, Site Reliability Engineering, chapter 3: Embracing Risk (opens in a new tab)
    Where error budgets come from, and how they settle the fight between speed and safety.
  5. Google, Site Reliability Engineering, Appendix A: Availability Table (opens in a new tab)
    How much downtime each number of nines allows per year, quarter, month and day.
  6. Google, The Site Reliability Workbook, chapter 2: Implementing SLOs (opens in a new tab)
    How to choose SLIs, pick a time window, and write an error budget policy.
  7. Google, The Site Reliability Workbook, chapter 5: Alerting on SLOs (opens in a new tab)
    Burn rates and the multiwindow, multi-burn-rate alerts used in this lesson.
  8. Roblox, “Roblox Return to Service 10/28–10/31, 2021” (opens in a new tab)
    A 73-hour outage where monitoring depended on the system that was failing.
  9. Slack Engineering, “Slack's Outage on January 4th 2021” (opens in a new tab)
    Dashboards and alerts failed during the outage because they depended on the broken network.

Real incident: Roblox, 28 Oct 2021: Roblox outage: 73 hours down after Consul broke

Real incident: Slack, 4 Jan 2021: Slack outage: post-holiday traffic overloaded a cloud network link

Case studies: Stripe: Canonical log lines: one rich log line per request

Related: Alerting and on-call · Distributed tracing in practice · Incident response and postmortems

Next on this line: Alerting and on-call explains how to page humans only for what matters.

Term

See full entry

Jump to a section

  1. 1What broke
  2. 2The idea in simple words
  3. 3How it works
  4. 4Trade-offs
  5. 5At work
  6. 6With AI
  7. 7Check yourself
  8. 8Go deeper