LOOP · The DevOps Codex
Ch 13 · Observability
Chapter 13 · See the System

Observability — debugging production from the outside in

Monitoring tells you the things you already knew could go wrong. Observability lets you ask new questions of a running system without shipping new code. This chapter maps the 2026 telemetry stack — OpenTelemetry, metrics, logs, traces, profiles, RUM, and the SaaS giants — and shows where the cardinality and cost dragons live.

13.1 · Monitoring vs observability

Definition. Monitoring watches pre-declared signals against pre-declared thresholds — it answers known questions. Observability is a property of a system: how easily you can infer its internal state from its external outputs, including questions you did not anticipate.

MonitoringObservability
Failure classKnown unknownsUnknown unknowns
Primary artefactDashboards & alertsHigh-cardinality events you can slice
Question shape"Is X up?""Why is this specific user's checkout slow right now?"
SchoolsNagios / Zabbix lineageDapper (Google 2010), Honeycomb "wide events" (2016)

SLIs (service-level indicators) belong to monitoring's vocabulary; SLOs (objectives) live in SRE (Ch 14). Observability is what lets you debug why an SLO burned.

13.2 · The pillars (and a heretic school)

PillarWhat it isBest for
MetricsNumeric time-series with low cardinality labels.Trend dashboards, alerts, capacity.
LogsTimestamped, mostly-textual events.Forensics, audit, error context.
TracesCausally-linked spans across services.Latency hotspots in distributed systems.
ProfilesSampled stack-traces (CPU, alloc, lock)."Which function is burning CPU?"
EventsDiscrete state changes (deploy, flag flip).Annotations & change correlation.
Wide events. Honeycomb's Charity Majors argues the "three pillars" model is a tooling artefact; a single wide structured event (200+ fields per request) can replace metrics, logs, and traces if storage is columnar. Many 2025 vendors converged on this view.

13.3 · OpenTelemetry — the lingua franca

Definition. OpenTelemetry (OTel) is a CNCF project (merger of OpenCensus + OpenTracing, 2019) providing vendor-neutral SDKs, an agent (Collector), and a wire protocol (OTLP) for metrics, logs, traces, and now profiles. Tracing graduated in CNCF in 2024; metrics & logs are stable in most languages.

  • Auto-instrumentation — Java (javaagent), .NET, Python, Node, Go (eBPF) capture HTTP/DB/queue calls with zero code changes.
  • Semantic conventions — standardised attribute names: http.request.method, db.system, and (since 2024) gen_ai.system, gen_ai.request.model, gen_ai.usage.input_tokens.
  • Collector — receive (OTLP, Prometheus, Fluent, Jaeger) → process (batch, filter, tail-sample) → export to any backend; replaces vendor agents.
  • Context propagation — W3C traceparent/tracestate headers carry the trace ID across services and queues.
App + OTel SDKauto-instrument eBPF agentPixie · Beyla · Grafana OTel Collectorreceive · process · exportOTLP / gRPC + HTTP Prometheus / Mimir Loki / OpenSearch Tempo / Jaeger

13.4 · Metrics stack

ToolModelNotes (2026)
Prometheus (CNCF, graduated 2018)Pull, TSDB, PromQLDe-facto open standard; remote-write OTel.
VictoriaMetricsSingle-binary, MetricsQL, cluster ed.10–20× compression of Prom; popular for high-cardinality.
Grafana MimirMulti-tenant TSDB (forked Cortex)Object-store backed (S3/GCS); horizontal scale.
Cortex / ThanosDistributed Prom, long-term storeThanos = sidecar+sidecar+compact; Cortex more SaaS-like.

13.5 · Logs stack

ToolRoleSweet spot
Loki (Grafana)"Like Prometheus, for logs" — index labels onlyK8s-native, cheap object storage.
OpenSearch / Elasticsearch / ELKFull-text inverted indexRich search, complex aggregations.
Splunk Enterprise / CloudProprietary index + SPLHeavyweight enterprise, security SIEM heritage.
Vector (Datadog OSS)Rust pipeline agentReplaces Logstash/Fluentd; VRL transform DSL.
Fluent Bit / Fluentd (CNCF)ForwardersFluent Bit = C, embedded; Fluentd = Ruby, plugins.

13.6 · Traces stack

ToolLineageNotes
Jaeger (CNCF, graduated 2019)Uber, 2017OTLP-native; storage: Cassandra, ES, OpenSearch.
Grafana TempoGrafana Labs, 2020Object-store only, no index — cheap; TraceQL.
ZipkinTwitter, 2012The original; smaller mind-share now.
AWS X-RayAWS-managedTight IAM/Lambda integration.
GCP Cloud TraceGCP-managedAuto-traces from App Engine, Cloud Run.
HoneycombSaaS, wide-event modelBubbleUp anomaly diff; very fast slice/dice.

13.7 · Continuous profiling

Definition. Continuous profiling samples stack traces from production processes at low overhead (~1% CPU) so you can answer "which function is burning resources?" historically, not just under perf on a laptop.

ToolOriginNotes
Pyroscope (Grafana, 2023+)OSS, merged with PhlareFlame graphs, eBPF + SDK ingestion.
Parca (Polar Signals)OSS, eBPF-firstFrostDB columnar store.
Polar Signals / Datadog ProfilerSaaSCommercial; bundled with APM.
OTel Profiling signalCNCFDonated by Elastic 2024; OTLP profile messages stabilising.

13.8 · Front-end RUM & synthetic

Definition. RUM (Real User Monitoring) captures Core Web Vitals (LCP, INP, CLS) from actual browser sessions. Synthetic monitoring runs scripted user journeys on a schedule from chosen regions.

ToolRUMSynthetic
SentryYes (Errors + Performance + Replay)Cron monitors
DatadogYesYes (multistep, mobile, API)
Vercel Analytics / Speed InsightsEdge-native—
Checkly—Playwright-as-code monitors
Better Stack (Uptime)LimitedHeartbeats + screenshot diffs
GCP Cloud Monitoring—Synthetic monitors GA 2024

13.9 · SaaS observability platforms

VendorStrengthsCaveats
DatadogBroadest single-pane; 25+ products.Cost; per-host + per-GB ingest stacks.
New Relic"Usage-based" pricing (per-GB + per-user).UI density curve.
DynatraceOneAgent auto-discovery, Davis AI causal.Enterprise-focused.
Grafana CloudOSS-stack (Loki/Mimir/Tempo/Pyroscope) as SaaS.You assemble the experience.
HoneycombWide-event tracing, BubbleUp diff analysis.No metrics-native (events-first).
Splunk Observability CloudStrong metrics + APM (ex-SignalFx).Two products (logs vs o11y) until convergence.

13.10 · LLM & AI observability

The 2024–25 wave: agentic apps need traces of prompts, tool calls, token usage, and eval scores.

ToolFocusOpen?
OpenLLMetry (Traceloop)OTel semconv for LLMsOSS SDK
LangfuseTraces + prompt mgmt + evalsOSS + Cloud
LangSmith (LangChain)Traces tied to LangChain/LangGraphSaaS
Arize PhoenixEval + drift + RAG analyticsOSS + SaaS
HeliconeProxy-based logging + cachingOSS + SaaS

13.11 · RED · USE · Four Golden Signals

MethodWhat to measureWhen
RED (Tom Wilkie)Rate, Errors, DurationPer request-driven service.
USE (Brendan Gregg)Utilisation, Saturation, ErrorsPer resource (CPU, disk, queue).
Four Golden Signals (Google SRE)Latency, Traffic, Errors, SaturationUser-facing systems generally.
Pick by subject. RED for the service, USE for the box it runs on, Golden Signals for the user journey. They are complementary, not competing.

13.12 · Cardinality & cost

Definition. Cardinality is the number of unique label combinations a time series can take. A metric http_requests_total{route, status, user_id} with a million users explodes into a million series — and a million-dollar bill.

  • Never label with unbounded values — no user_id, no request_id, no raw url. Use traces/logs for that detail.
  • Pre-aggregate — recording rules in Prometheus, materialised views in ClickHouse, transform processors in OTel Collector.
  • Head vs tail sampling — head = decide at trace start (cheap, blind). Tail = collect all spans, decide after (smart, needs buffering).
  • Log tiering — DEBUG to local disk, INFO to warm tier (~7 days), WARN/ERROR to long-term (90 days+). Datadog "Log Indexes" charge by what you make searchable.
  • Egress traps — shipping logs cross-region/cross-cloud is often more expensive than storing them.

13.13 · Anti-patterns

  • "Log everything, alert on everything." Alert fatigue (Ch 15) and a six-figure observability bill in one move.
  • Multiple vendors per pillar. Datadog APM + New Relic metrics + Splunk logs = three context-switches during an incident.
  • Traces without context propagation. Without W3C headers crossing every hop, your "distributed trace" is a single-service span.
  • Unbounded labels. One user_email label has retired more than one observability budget.
  • Dashboards as truth. A green dashboard with broken alerting still means an outage you do not know about.
  • No SLOs. Without an objective, every spike looks scary and none of them matter (Ch 14).
The Three Pillars Lie. Storing metrics, logs, and traces as three separate systems triples your bill and makes correlation a copy-paste exercise. Modern stacks (Grafana LGTM, Datadog, Honeycomb) share IDs across signals so you can pivot in one click.

13.14 · Self-check

Q1 · Which CNCF project provides vendor-neutral SDKs, a Collector, and the OTLP wire protocol for metrics, logs, and traces?
Prometheus
OpenTelemetry
Fluent Bit
Jaeger
Q2 · You add a user_id label to http_requests_total and your Prometheus bill explodes. What did you violate?
RED method
Cardinality discipline
USE method
SLO budget policy
Q3 · Which method is designed for measuring a resource (CPU, disk, queue), not a request-driven service?
RED (Rate, Errors, Duration)
USE
Four Golden Signals
SLI/SLO