Observability: recap and quiz
The module in six sentences
Section titled “The module in six sentences”- Logs, metrics and traces. A log records an event, a metric aggregates measurements, and a trace follows one request, so each is the cheap answer to one question and a poor answer to the others.
- Metrics and the four golden signals. Latency, traffic, errors and saturation, read together against normal, tell slow work (latency up, traffic flat) from too much work (traffic up).
- Traces and spans. A trace is a call tree with a clock on every branch, and it shows the hop that holds the time or the call that is repeated, which a dashboard shows only as more traffic.
- SLIs, SLOs and SLAs. An SLI is good events over valid events, an SLO is its target over a window, and an SLA is a contract with consequences, so a target decides how much failure is allowed.
- Error budgets and burn rates. The burn rate is the failing share over the allowed share, the budget lasts the window over the burn rate, and a burn rate of 14.4 spends 2% of the budget in an hour.
- Alerting on symptoms. Page on what users feel, with burn-rate alerts over a long and a short window, because a cause alert only fires for the failure someone expected.
How each one breaks
Section titled “How each one breaks”| Idea | What breaks | What you see | What helps |
|---|---|---|---|
| Three signals | Only one kind of telemetry | Errors you cannot count, or counted and unexplained | Metrics to detect, traces to locate, logs to explain, with a trace ID in every line |
| Golden signals | Reading one signal alone, or one service alone | A healthy caller and slower users | The four signals together, against normal, with the time in the service itself |
| Traces | Sampling, averages, missing context | The slow request is not there, or the spans do not add up | Keep slow and failed traces, check that spans sum to the root |
| SLO | A target of 100%, or today’s number | A promise nobody chose | A target from what users need and the team can sustain |
| Error budget | An SLI that cannot see the problem | Slow users and a full budget | A latency SLI as well as an availability SLI |
| Alerting | Paging on causes | Noise, then ignored pages | Page on burn rates, keep causes for finding the fault |
A checklist for an observable service
Section titled “A checklist for an observable service”Each question points back to the lesson that answers it.
- Can you tell, from outside, whether a user’s request worked? Measure the SLI near the user. (SLIs, SLOs and SLAs)
- Does every service report the four golden signals? Latency of successful requests apart from failed ones, traffic, errors and saturation. (Metrics and the four golden signals)
- Are latency percentiles built from histograms? A percentile of averages is not a percentile. (Metrics and the four golden signals)
- Is there a user ID, or any unbounded value, in a metric label? Move it to a log or a span. (Logs, metrics and traces)
- Does a trace ID follow the request across every hop and into the log lines? (Traces and spans)
- Which traces are kept? A plain share may drop the one you need. (Traces and spans)
- What is the SLO, over which window, and what does it allow in requests and in minutes? (SLIs, SLOs and SLAs)
- What happens when the budget is spent? Write the policy before you need it. (Error budgets and burn rates)
- Does a slowdown that fails nothing spend any budget? If not, add a latency SLI. (Error budgets and burn rates)
- What pages, and what is only a ticket? Page on burn rates over several windows. (Alerting on symptoms)
Check your understanding
Section titled “Check your understanding”Nine questions cover the whole module. Every option is explained, whether it is right or wrong.
Observability: module quiz
This quiz needs JavaScript to check your answers.
Where this goes next
Section titled “Where this goes next”Observability tells you that something is wrong and where. The modules on security and deployment are where it is put to work: a deployment that goes bad shows first as a burn rate, and a security control that fails shows as errors on the path it protects. Ask this module’s questions of each one: what would the evidence look like, who is paged, and what do you do first.
Your progress
Built by GhaziAlibi.
© ShardCraft. All rights reserved.