Unit 4 of 15 · about 5 hours · explain, measure

SLIs, SLOs, error budgets, telemetry and incident reconstruction

Budgets turn reliability arguments into arithmetic, and propagated context turns scattered logs into one causal trace. Both are prerequisites for every measurement later in this section.

You'll be able to

  • Define SLIs, SLOs and error budgets with explicit windows, and convert budget burn into alert thresholds.
  • Emit traces, metrics and logs with W3C context propagation and bounded attributes.
  • Reconstruct an incident from stored telemetry without assuming synchronized clocks.

Covers

SLI, SLO and error-budget definitionsLatency, error, saturation and correctness telemetryIncident reconstruction and runbook execution
1

Read

In this order, only the parts listed

0 of 6 done

  1. Service level objectives: terminology and practiceGoogle SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and Recovery

    Service Level Terminology; Indicators; Objectives; Agreements; Indicators in Practice (Aggregation, A Note on Statistical Fallacies); Objectives in Practice (Defining Objectives, Choosing Targets)

  2. Implementing SLOs: windows and decisionsGoogle SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and Recovery

    Getting Started; Choosing an Appropriate Time Window; Decision Making Using SLOs and Error Budgets

  3. Burn-rate alertingGoogle SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and Recovery

    Alert on Burn Rate; Multiple Burn Rate Alerts; Multiwindow, Multi-Burn-Rate Alerts

    Read for the two-window structure. The Systems unit on SLIs, SLOs, error budgets and recovery objectives already derived the single-window budget; do not redo it.

  4. Monitoring: the four golden signalsGoogle SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and Recovery

    The Four Golden Signals; Symptoms Versus Causes; Black-Box Versus White-Box

    Read for signal choice and cause-versus-symptom discipline. Leave Google-internal tooling as examples, not setup.

  5. Context propagation: traceparent, inject and extractOpenTelemetry Signals and Semantic Conventions

    Context; Propagation (default W3C TraceContext propagator); the traceparent field order version, trace id, parent id, flags; Inject and extract; Security best practices (Baggage) (page read 2026-10-15)

  6. Gray failure: when the detector disagrees with clientsGray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)

    Gray versus fail-stop framing; differential observability (Table 1); the stuck handler with a live heartbeat

    Read as failure-model vocabulary for why reconstruction needs several signals. The cases are Microsoft-internal, not reproducible.

2

Focus on

  • An SLO without a window is not measurable. The Workbook chooses the window before the target, because the same ratio burns differently over 1 hour and 30 days.
  • Multiwindow burn-rate alerts require the threshold in both a long and a short window. The long window establishes significant budget consumption; the short window confirms the burn is still active and clears the alert soon after recovery.
  • Propagation carries trace id and parent id in traceparent. Correlation needs no synchronized clocks, only the carried parent link. A gray fault bounds what one trace proves: the detector may see healthy while clients see sick, so reconstruction needs several signals.
  • Baggage is not a secret channel. OpenTelemetry warns against credentials, keys and PII in baggage because it crosses service boundaries and lands in logs.
Common mistakes · 3
  • Averaging percentiles across services. A p99 of p99s is not the system p99; aggregate the underlying samples or count budget burn per service.
  • Interpolating a nearest-rank percentile. The method returns an observed sample at rank , never a value between samples.
  • Alerting on every firing evaluation. The alert manager groups by fingerprint and repeats only after the interval; resolution clears the incident.
3

Try it yourself

Closed-book, before checking anything

Without notes, compute the 30-day error budget in minutes for a 99.9% SLO on a time-based availability SLI, and the nearest-rank p50, p95 and p99 of [12, 45, 33, 21, 90, 8, 67, 54, 29, 71] ms.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.For a time-based availability SLI, how many minutes of full unavailability exhaust a 99.9% SLO over 30 days?Answer

    minutes. A request-based SLI budgets failed requests instead; converting to minutes needs a traffic assumption.

  2. 2.Ten samples sort to [8, 12, 21, 29, 33, 45, 54, 67, 71, 90]. What are the nearest-rank p50 and p95?Answer

    p50 uses rank , value 33. p95 uses rank , value 90.

  3. 3.Why do burn-rate alerts use two windows instead of one fast window?Answer

    An alert fires only when both windows exceed the burn threshold. The long window shows the budget is really being consumed; the short window shows the burn is still happening, so the alert clears soon after the errors stop.

  4. 4.A downstream log carries the trace id from an incoming traceparent. Why does that correlation need no clock sync?Answer

    Causality comes from the carried parent link, not from comparing timestamps. Display order may still mislead across machines.

  5. 5.An alert fires, resolves, then fires again 1 unit later with repeat interval 10. How many notifications?Answer

    Two. Resolution clears the fingerprint, so the next firing is a new incident, not a repeat.

5

Practice

  • AlgoMaster: Calculate Nearest-Rank Latency Percentiles

    latencyPercentiles returns [p50, p95, p99] by 1-based nearest rank without interpolation and without mutating the input

  • AlgoMaster: Deduplicate Alert Notifications

    notificationStates groups by fingerprint, repeats only after the interval, and clears on resolution; the page tests that a post-resolution firing notifies fresh

    The section mini-project covers this: inject an incident on the instrumented path, reconstruct its causal request and fault history from stored telemetry with deliberately skewed display timestamps, and mark gaps where instrumentation cannot establish order.

You're done when

Your budget arithmetic and percentile ranks match the worked numbers, you can set a two-window burn alert plus a traceparent instrumented path on loglab, and your incident reconstruction marks every gap in the causal order.

Only when you can do this without notes.

Leads to

Notes

Resources · 3 for this unit, 14 more in the section
  • Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required

    Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.

  • Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support

    Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.

  • OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support

    Read signals and context propagation (W3C Trace Context traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps.

Also in this section

  • HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary

    Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.

  • DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support

    Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.

  • Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support

    Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.

  • Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support

    Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.

  • Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support

    Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.

  • The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support

    Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.

  • Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional

    Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.

  • SPIFFE Workload Identity and Workload APISPIFFE Project · support

    Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (FetchX509SVID, FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap.

  • Replicated Log and Stream Processor - Production ContractRoadmap-Final · support

    Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.

  • OWASP Threat Modeling Cheat SheetOWASP · reference

    Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.

  • Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support

    Read Point-in-time joins (entity dataframes, get_historical_features, TTL backward scan, filter_by_created_timestamp) and Feature retrieval (event_timestamp as the inclusive upper bound, get_online_features without timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation).

  • MLflow Model Registry DocsMLflow · support

    Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.

  • DVC Docs - Data VersioningDVC · support

    Read dvc add (Description and Example: Single file) for .dvc content-hash sidecars, the dvc.yaml page with its dvc.lock file section for pipeline state, and push and pull for transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15.

  • PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference

    Read Section 19.5.6 Recovery Target, the pg_verifybackup reference and the pg_rewind reference for recovery stopping points, manifest checks and rejoining a diverged primary.