Observability
Read logs, metrics and traces the way an on-call engineer does: compute the numbers worth watching, set alerts worth waking for, and follow one incident from the page to the cause. Every rate, percentile and error budget is worked on numbers small enough to check.
- Intermediate
- 4 units, 12 lessons, 154 exercises
- Logs, text, a little Python
- Builds on Linux & the Shell
Unit 01 · 3 lessons
Three signals
Read logs, metrics and traces, and know which question each one answers
- 01Logs
Levels, JSON lines, the request id that ties lines together, and what never to write.
- 02Metrics
Counters, gauges and histograms, a rate from two readings, and what a label costs.
- BOSSTraces
Spans with parents and durations, context passed between services, and one slow request read to the slow hop.
Read the unit guide
A running service cannot be paused and stepped through. All you get is what it chose to write down while it worked. That writing comes in three shapes, and each answers a different question.
A log line is a record of one event: this request failed, with this status, for this reason. Logs are detailed and expensive, because their volume grows with traffic. Written as one JSON object per line and tied together by a request id, they tell the story of a single request.
A metric is a number read on a schedule: requests so far, connections open now, how many requests took under 100 ms. It costs the same at ten requests a second as at ten thousand, which is why dashboards and alerts are built on metrics. The price is detail: a counter remembers how many, never which.
A trace follows one request through every service it touched. It is a tree of spans, each with a parent and a duration, so you can read where the time went hop by hop.
The habit this unit builds is picking the signal by the question. "Is it broken, and since when?" is a metric. "Where is the slow hop?" is a trace. "Why did it fail?" is a log line.
Unit 02 · 3 lessons
Measuring
Turn raw telemetry into the few numbers that say whether users are fine
- 01Percentiles
p50, p95 and p99 from samples, why averages mislead, and what histogram buckets cannot tell you.
- 02What to watch
Latency, traffic, errors and saturation, and a dashboard that says whether it is broken, and where.
- BOSSSLOs and error budgets
One service, one indicator, one objective: the budget it leaves in minutes and in requests, and how fast it burns.
Read the unit guide
The average hides the users who are suffering. Nine fast requests and one terrible one average out to a number nobody experienced. So latency is reported in percentiles: p50 is what the typical request saw, p99 is the request that 99 in 100 beat.
This unit computes percentiles by one fixed rule, nearest rank: sort the samples, take rank = ceil(p / 100 x n), and read the value at that rank. No interpolation, so every answer is a value that really occurred.
Production systems cannot keep every sample, so they count requests into histogram buckets and estimate percentiles from the counts. The estimate is only as sharp as the bucket it lands in, and you will learn to say what the buckets prove and what they merely suggest.
With the arithmetic in hand, the next question is which numbers deserve a place on the wall. Four are enough for most services: latency, traffic, errors and saturation. A dashboard built on them answers "is it broken, and where" in one look.
The boss lesson turns measurements into a promise. An indicator says how good the service is, an objective says how good it must be, and the gap between the objective and perfect is the error budget: the amount of failure you are allowed to spend, counted in minutes or in requests.
Unit 03 · 3 lessons
Alerts and incidents
Page a person only for what a person must fix, and run the incident that follows
- 01Alerts
Symptoms over causes, thresholds with a duration, pages against tickets, and the alert nobody reads.
- 02Incidents
Triage, mitigate before you understand, roll back first, keep people informed, and write the runbook beforehand.
- BOSSOne incident, start to finish
A page arrives. Metrics narrow it, a trace finds the hop, logs give the cause, and a blameless review ends it.
Read the unit guide
Wake a person only for what a person must fix. An alert is a rule over a metric that interrupts a human, and human attention is the scarcest resource in the system. Every page that turns out to need no action teaches the team to ignore the next one.
Good alerts fire on symptoms: users are getting errors, requests are slow, the error budget is burning fast. Causes, such as a busy CPU or a restarted process, belong on dashboards, where you look them up once a symptom has told you something is wrong. A threshold also needs a duration, so a one-minute blip does not page, and every alert needs a destination: a page for now, a ticket for this week, or nothing.
When a real page arrives, the order of work is fixed and a little unnatural. First make it stop hurting users: roll back, turn the feature off, shed load. Only then find out why. Engineers want to understand before they act; users want it to work.
An incident also needs talking. One person decides, someone tells the rest of the company what is known and when the next update comes, and the steps for common failures are written down in runbooks long before 3 a.m.
The boss lesson runs one incident from the page to the review. Metrics narrow it to a service, a trace finds the hop, logs give the cause. Afterwards a blameless review asks how the system let it happen, and ends in actions with owners.
Unit 04 · 3 lessons
In practice
Instrument a service, debug it in production, and keep the telemetry bill sane
- 01Instrumenting
Where a span or a metric earns its place, naming, vendor-neutral instrumentation in outline, and sampling.
- 02Debugging production
Slice by version, region or customer, compare bad requests with good ones, and read what a canary shows.
- BOSSObservability at scale
A label that multiplies series, sampling and retention as cost levers, and the telemetry for one service designed inside a budget.
Read the unit guide
Telemetry is code you write and a bill you pay. Nothing is observable by default: a span exists because someone started it, a counter because someone incremented it. This unit is about choosing where that code goes and what it costs to keep its output.
Instrumentation earns its place at boundaries: where a request comes in, where a call goes out to another service, a database or a queue, and at the few steps the business cares about. Names stay fixed and low in variety; the details that vary go in labels when they are few and in span attributes or log fields when they are many.
You will meet vendor-neutral instrumentation in outline: your code calls a standard interface, and configuration decides where the data is sent. And sampling: keeping one trace in a hundred, or deciding after the fact to keep the ones that failed.
Debugging production is mostly slicing. An overall number that looks slightly bad is often one group having a terrible time: one version, one region, one customer. Split the signal until one slice holds the problem, then compare failing requests with healthy ones and look for what only the failures share.
The boss lesson is about scale. Series multiply with every label, traces with every request, logs with every line and every day they are kept. You will work out each of those and then design the telemetry for one service inside a budget.
Learn Observability on your phone.
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.