14.1 · The three pillars (+ two add-ons)
| Pillar | What it answers |
|---|---|
| Metrics | "Is the system healthy?" — aggregated counters / gauges / histograms. |
| Logs | "What happened?" — structured records of events. |
| Traces | "Where did the time go?" — end-to-end request paths across services. |
| Profiles | "Why is this CPU/heap hot?" — continuous profiling (Pyroscope, Parca). |
| Events / state changes | "What changed?" — deploys, flag flips, config updates — overlay on graphs. |
14.2 · OpenTelemetry — the standard, finally
- Vendor-neutral SDKs + collector + OTLP protocol for metrics, logs, traces.
- Auto-instrumentation for most languages and frameworks.
- Send to any backend (Datadog, Honeycomb, Tempo, Jaeger, Grafana Cloud, New Relic).
- Adopt OTel before picking a vendor — never the other way around.
14.3 · Metrics
| Type | Example |
|---|---|
| Counter | http_requests_total |
| Gauge | queue_depth |
| Histogram | http_request_duration_seconds |
| Summary | Like histogram but client-side percentiles. |
RED (Rate, Errors, Duration) per service. USE (Utilisation, Saturation, Errors) per resource. Together they cover 95% of dashboards.
14.4 · Logs
- Always structured JSON with: trace_id, span_id, user_id, tenant_id, request_id.
- Levels: debug / info / warn / error / fatal. error means "page someone".
- Never log secrets / PII (Ch 15).
- Centralise: Loki, Elasticsearch, Datadog Logs, Better Stack.
14.5 · Traces & spans
A trace is a tree of spans across services. Each span has an ID, parent ID, timing, attributes. With OTel context propagation, a single request shows up as one tree — the only sane way to debug distributed systems.
14.6 · Continuous profiling
Sample CPU / memory / lock contention in production continuously, attribute to functions. Pyroscope, Parca, Datadog Profiler. Catches the 1% slow path that benchmarks miss.
14.7 · SLI / SLO / SLA / error budgets
| Term | Definition |
|---|---|
| SLI | Service Level Indicator — a measurable signal (e.g. success rate, p95 latency). |
| SLO | Service Level Objective — a target for an SLI over a window (e.g. 99.9% / 30d). |
| SLA | Service Level Agreement — customer-facing contract with consequences. |
| Error budget | 1 − SLO. The badness budget for the period. |
| Burn rate | How fast the budget is being consumed; alert on multi-window burn (fast + slow). |
Rule: if you've burned through the budget, you stop shipping features and fix reliability. This is what gives engineering moral authority to slow down.
14.8 · Alerts that don't suck
- Alert on symptoms users feel, not on internals.
- Every alert has a runbook link.
- Use multi-window, multi-burn-rate alerts (Google SRE workbook).
- Page only what needs action now. Everything else is a ticket.
- Review alert noise weekly. Mute, merge, or fix.
14.9 · Incident response
- Detect — alert or user report.
- Triage — assign Incident Commander, Comms, Scribe.
- Mitigate — restore service. Rollback > debug.
- Communicate — status page updates every 30 min.
- Resolve — confirm metrics back to normal.
- Postmortem — blameless, 5-whys, action items with owners and dates.
14.10 · On-call hygiene
- Rotation: 1 week primary + 1 week secondary; comp time for nights.
- Hand-off: a doc with active incidents, watch items, recent changes.
- "Follow the sun" if you have teams in multiple regions.
- If on-call hates their week, the system is broken — fix it before people quit.
14.11 · The 2026 observability toolbox
| Concern | Picks |
|---|---|
| Open-source stack | Prometheus + Mimir + Loki + Tempo + Grafana + OTel Collector + Pyroscope |
| Managed all-in-one | Datadog, New Relic, Grafana Cloud, Sumologic, Splunk |
| Wide-events / next-gen | Honeycomb, Hyperdx |
| Errors | Sentry |
| RUM / front-end | Datadog RUM, Sentry, Vercel Analytics |
| Synthetic checks | Checkly, Datadog Synthetics, Better Stack |
| Incident | PagerDuty, Opsgenie, FireHydrant, incident.io, Rootly |