17.1 · Pillars — three classic + two modern
| Pillar | Answers |
|---|---|
| Metrics | "Is it healthy?" |
| Logs | "What happened?" |
| Traces | "Where did time go?" |
| Profiles | "Why is CPU / heap hot?" |
| Events / state changes | "What changed?" (deploys, flag flips, config) — overlaid on graphs. |
17.2 · OpenTelemetry — the standard, finally
- Vendor-neutral SDKs + collector + OTLP protocol for metrics, logs, traces.
- Auto-instrumentation for most languages and frameworks.
- GenAI semantic conventions (2025+) — standardised attributes for LLM spans.
- Send to any backend (Datadog, Honeycomb, Tempo, Jaeger, Grafana Cloud, New Relic).
17.3 · Metrics — RED & USE
| Method | For | Tracks |
|---|---|---|
| RED | Services | Rate · Errors · Duration |
| USE | Resources | Utilisation · Saturation · Errors |
| The Four Golden Signals | Google SRE | Latency · Traffic · Errors · Saturation |
17.4 · Logs
- Structured JSON always; include
trace_id,span_id,user_id,tenant_id,request_id. - Levels: debug / info / warn / error / fatal. error = "page someone".
- Never log secrets / PII.
- Centralise: Loki, Elastic/OpenSearch, Datadog Logs, Better Stack.
17.5 · Traces & spans
A trace is a tree of spans across services. Each span has IDs, timing, attributes. With OTel context propagation, one request shows up as one tree — the only sane way to debug distributed systems.
17.6 · Continuous profiling
Sample CPU / memory / lock contention in production continuously, attribute to functions. Pyroscope, Parca, Datadog Profiler. Catches the 1% slow path benchmarks miss.
17.7 · Wide events — the post-pillar idea
Honeycomb-style: one very wide event per request with hundreds of attributes; query / break down later. Replaces metrics + logs for many use cases.
17.8 · SLI / SLO / SLA / error budgets
| Term | Definition |
|---|---|
| SLI | Service Level Indicator — measurable signal (success rate, p95 latency). |
| SLO | Target for an SLI over a window (99.9% / 30d). |
| SLA | Customer contract with consequences. |
| Error budget | 1 − SLO. Spend it on shipping. |
| Burn rate | Rate of error-budget consumption. |
17.9 · Alerts that don't suck
- Alert on symptoms users feel, not internals.
- Every alert links to a runbook.
- 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 / fix.
17.10 · Incident response
- Detect — alert or user.
- Triage — assign Incident Commander, Comms, Scribe.
- Mitigate — restore service first. Rollback > debug.
- Communicate — status page every 30 min.
- Resolve — confirm metrics back to normal.
- Postmortem — blameless, 5-whys, action items with owners.
17.11 · Performance engineering
- Measure first — flamegraphs, perf, bpftrace, async-profiler, py-spy, Node Inspector.
- Benchmark — k6 / wrk / Gatling for HTTP;
cargo bench/ JMH for code. - Profile in prod with continuous profilers.
- Optimise the hot path — 90% of CPU is in 10% of the code.
- Common wins: N+1 query → join / batch; sync I/O in loop → batch async; allocation in hot loop → pool / reuse; CPU-bound JSON → faster lib (orjson, simdjson); GC pauses → tune heap, generations.
17.12 · Chaos engineering
- Inject failure (CPU pressure, network latency, pod kill, DNS slow) on purpose.
- Tools: Litmus, Chaos Mesh, Gremlin, AWS FIS, Steadybit.
- Always game-day in staging first; production chaos requires SLO budget & comms.
17.13 · The 2026 observability toolbox
| Concern | Picks |
|---|---|
| Open-source | Prometheus + Mimir + Loki + Tempo + Grafana + OTel Collector + Pyroscope |
| Managed | Datadog, New Relic, Grafana Cloud, Sumologic, Splunk, Dynatrace |
| Wide-events / next-gen | Honeycomb, Hyperdx |
| Errors | Sentry |
| RUM / frontend | Datadog RUM, Sentry, Vercel Analytics |
| Synthetic | Checkly, Datadog Synthetics, Better Stack |
| Incident management | PagerDuty, Opsgenie, incident.io, FireHydrant, Rootly |
| LLM-specific | OpenLLMetry, LangFuse, LangSmith, Arize Phoenix |
17.14 · Self-check
Q1 · Best alert pattern for catching SLO violations early without paging on blips?
Single threshold on average latency
Multi-window, multi-burn-rate
Alert on raw error counts only
Daily cron summary