Reviewing for Observability & Operability

The real test of a diff: can the on-call who has never seen this code debug it at 2 AM with only the dashboards?

Student edition · understand, apply, verify

Review whether a new behavior can be detected and explained without unsafe or excessive telemetry.

What you should be able to do: Define user-facing outcomes and diagnostic signals with bounded cardinality, coverage, and actionable alert policy.

A context-dependent practice guide, not a universal policy or verified personal history. Examples and numbers are illustrative. Use genuine, authorized evidence; personnel/privacy/legal decisions follow applicable organization policies and qualified review.

Concepts explained in this guide

Read these definitions first, or use the linked terms as you go. The examples and limitations are local to this guide; companion pages are optional.

SLIs, SLOs, and error budgets

An SLI measures a user-relevant outcome; an SLO sets its target over a window. For a success-ratio SLO, the allowed bad fraction is 1−SLO. An SLA is a contractual commitment that may use different definitions.

Example. 99.9% successful requests over 1 billion requests allows 1 million bad requests. A time-based 30-day availability target instead allows 43.2 unavailable minutes.

Boundary. Request and time budgets are not interchangeable under variable traffic or partial failure. SLOs are not universally stricter than SLAs; choose both from their definitions and user needs.

Burn-rate alerting

Burn rate is the observed bad-event fraction divided by the allowed bad fraction. Multi-window alerts require sustained long-window burn and a confirming short window so old incidents can clear.

Example. For a 99.9% SLO, 2% errors is 20× burn. In a 30-day window, 14.4× time-normalized burn for one hour consumes 14.4/720=2% of budget.

Boundary. That conversion assumes time-based measurement or roughly representative request volume. Low traffic, missing telemetry, and denominator-zero need policy; an alert alone does not guarantee response.

Cardinality

The number of distinct identities a store must track. A metric series is its metric name plus the full label combination. The product of label-value counts is an upper bound when not every combination occurs.

Example. 100 hosts × 20 routes × 5 status codes can produce up to 10,000 series. Adding a unique request_id can make every request create a new series.

Boundary. Hashing every ID to a distinct digest does not reduce cardinality or guarantee anonymity. Use bounded categories, explicit limits, or intentional fixed-bucket aggregation.

Spans and trace context

A span records one operation with a trace ID, span ID, parent or links, timing, and attributes. Context propagation sends the current trace/span identity across HTTP, RPC, thread, and queue boundaries so related work can be assembled.

Example. A gateway starts a trace, injects W3C traceparent into a service call, and the service links its queue consumer work to the producer span.

Boundary. Cross-host wall clocks can skew timelines. A parent-child graph is not always a tree because asynchronous work can have multiple links. Instrumentation must be configured; IDs are not automatically present in every log.

Outputs, outcomes, and measurement

Outputs are produced things; outcomes are changes for users/business/team. Useful metrics state definition, denominator, population, period, and attribution limits.

Example. 'Shipped a tool' is output. 'Median onboarding fell ten to six days in this cohort' is an outcome with sample/context caveats.

Boundary. Before/after does not prove sole causation. Avoid gaming, selection bias, hidden costs, and unlike-team comparisons.

Code that works but can't be observed is a future outage with no flashlight. This question tests whether you review changes for their operational life — not just “is it correct” but “when it breaks, will we know, and will we be able to find out why fast.” For someone from storage and events infra, where you've carried the pager, this should be a strength. A new code path with no metric, a failure that logs nothing, an alert that pages on a symptom no one can act on — these are the things a senior reviewer catches before they become a 3 AM mystery.

Flow of reviewing for observability: RED/USE metrics, structured logs, correlation IDs, trace spans, alerts, dashboards and runbook, cardinality cost
The operability lens: RED/USE metrics on new paths, structured logs at the right level, correlation/request IDs, trace spans, actionable alerts, dashboards and a runbook — and control the cardinality cost of it all.

What this question is really testing

Whether you own the 2 AM debuggability of code you approve. The signal is that you treat instrumentation as part of the feature, not an afterthought, and that you know the vocabulary — RED/USE, structured logging, correlation IDs, traces, actionable alerting — and the cost model behind it. It also tests judgment: more telemetry isn't automatically better; high-cardinality metrics and chatty logs have a real bill and can bury the signal.

How to answer What the interviewer is looking for
Concrete example — the invisible failure branch. A diff adds a fallback path: if the primary dimension store times out, the code silently emits the event un-enriched. Functionally reasonable. But there's no counter on the fallback, the timeout is caught and logged at DEBUG, and the enrichment latency isn't measured. In production, the primary store degrades, 30% of events quietly go un-enriched, downstream revenue attribution drifts — and every dashboard is green because nothing is instrumented. The reviewer's asks: a counter on the fallback branch, a latency histogram on the enrichment call, an ERROR-or-WARN log with the campaign/request ID, and an alert when the fallback rate crosses a threshold. Now the same degradation pages in minutes with a clear cause.

Common follow-ups

How do you tell good instrumentation from noise?

How to answer

What makes an alert good vs bad?

How to answer

The team says instrumentation can be a follow-up diff. Agree?

How to answer

How do you review the cost of observability?

How to answer
Evidence to collect with your approved tools

Worked example: an invisible fallback rate

This is an illustrative situation. The point is the reasoning and evidence, not copying the numbers or first-person story.

an invisible fallback rateState fallback behavior: A dependency timeout emits incomplete events; decide whether that is allowed for the consumer.. Measure numerator and denominator: Count incomplete and all eligible events, with latency and coverage/missing-data indicators.. Keep dimensions bounded: Use service/route/outcome labels; request IDs belong in authorized sampled logs/traces, not unbounded metric labels.. Alert on meaningful risk: Tie thresholds/burn windows to user impact and enough observations. Sampling and trace retention do not guarantee every error is visible.1State fallback behavior2Measure numerator and denominator3Keep dimensions bounded4Alert on meaningful risk
Sequence for this example. The table explains the evidence and decision at each step.
StepEvidence, decision, and expected result
State fallback behaviorA dependency timeout emits incomplete events; decide whether that is allowed for the consumer.
Measure numerator and denominatorCount incomplete and all eligible events, with latency and coverage/missing-data indicators.
Keep dimensions boundedUse service/route/outcome labels; request IDs belong in authorized sampled logs/traces, not unbounded metric labels.
Alert on meaningful riskTie thresholds/burn windows to user impact and enough observations. Sampling and trace retention do not guarantee every error is visible.
Check your understanding: Can tail sampling recover errors discarded at the head stage?

No. Tail only evaluates spans that actually reached its bounded collector state.

Run and change the example

Download guide_labs.py. Python 3.10+, standard library only. In its directory, run:

python3 guide_labs.py metrics
python3 guide_labs.py test

The lab demonstrates denominator and no-data policies. Production alert and trace coverage must be validated separately.

The program tests its stated finite contracts. It is an educational model, not an implementation of the named production product or a proof of unmodeled distributed faults.

Sources and further verification
⌂