Skip to main content

Observability & SRE

A metrics store, a log pipeline and a tracer, then Prometheus, Grafana, OpenTelemetry, SLOs and incident response.

Every on-call question is a query: is it broken for users, since when, where, and what changed. The tools that answer it (a Prometheus graph, a LogQL search, a trace waterfall, a burn-rate alert, an incident timeline) are only as good as your model of what they store and how they compute. A rate() that hides a counter reset, a label that explodes cardinality, a log shipper that drops lines on rotation, a trace that breaks at a queue and an alert that pages for nothing all come from mechanisms you can build in an afternoon. This phase builds each one from the standard library first, then runs the real tool on the same data and compares the answers.

How this phase is built​

LessonTypeWhat you buildWhat you then use
MetricsBuildminitsdb: the exposition format, a scraper with relabelling and staleness, a TSDB with Gorilla-compressed chunks and a cardinality reportPrometheus, promtool tsdb analyze, node_exporter
PromQLBuildminiql: selectors, rate with resets and extrapolation, aggregation, vector matching, histogram_quantilethe query API, recording rules, promtool test rules
TracingBuildminitrace: W3C Trace Context across three services, OTLP export, head and tail sampling, critical pathOpenTelemetry Collector, Jaeger
SLOsBuildminislo: error budgets, multiwindow multi-burn-rate alerts, generated recording and alerting rulesSloth or Pyrra, OpenSLO, promtool
IncidentsBuildminiincident: incidents from alert webhooks, roles, on-call schedules, escalation, timeline, MTTA/MTTR and a postmortem draftAlertmanager webhooks, PagerDuty's event shape
ChaosBuildminichaos: experiments with a steady-state hypothesis, faults, abort conditions and rollbacksChaos Mesh, tc netem, game days

More lessons for this phase are being written; the plan is in ROADMAP.md.

Reference layer​

The long-form guides for this phase live under Observability and the SRE learning path. The AIOps phase builds on this one: LLM observability traces agents with the same OpenTelemetry model.