Observability in depth
Building observability into a service
Observability is easiest when it is designed in, not bolted on during an incident. A practical sequence for a new or existing service:
- Instrument with OpenTelemetry. Start with automatic instrumentation for HTTP, database and queue libraries, then add manual spans around important business steps.
- Use structured logs in JSON with the trace ID and span ID in every line, so logs can be joined to traces.
- Emit the core metrics for each service: request rate, errors and duration, often called RED, plus saturation for resources.
- Add business attributes such as tenant, plan or region to spans, while keeping personal data out.
- Define SLOs for user-facing journeys and alert on burn rate rather than raw thresholds.
- Write runbooks linked from each alert, describing the first checks.
Example: a slow checkout
Example: an alert fires because the checkout latency SLO is burning faster than usual. The on-call engineer opens the alert's dashboard, sees high latency only for one payment method, and jumps to example traces from the slow requests. The traces show most time spent in a call to an external payment API, with retries. The correlated logs for those spans show timeout errors after a configuration change that lowered the connection pool size. The team rolls back the change through GitOps, confirms the SLO recovers, and records the finding in a blameless postmortem. Without traces, the same investigation would start with guesswork across several services.
Controlling telemetry volume and cost
Telemetry grows quickly, so plan for it from the start:
- Sampling: head sampling keeps a fixed share of traces; tail sampling in the OpenTelemetry Collector keeps all errors and slow traces and a sample of the rest.
- Cardinality: avoid metric labels with unbounded values, such as user IDs or full URLs, which multiply stored series.
- Retention tiers: keep detailed data briefly and aggregates longer.
- Log levels: debug logs off in production by default, with a way to turn them on for one service.
Measuring observability itself
Useful signals that observability is working include mean time to detect and mean time to resolve incidents, the share of incidents first detected by alerts rather than customers, the share of alerts that led to action, and how often postmortems list missing telemetry as a factor. These measures improve slowly and should be tracked over months.
Typical mistakes are three disconnected tools for metrics, logs and traces with no shared IDs, dashboards nobody looks at, alerts on CPU instead of user impact, and personal data written into logs. eBPF-based tools can add visibility without code changes. Observability supports SRE practice and error budgets, and the same ideas extend to AI systems through LLMOps tracing. Gepton sets this up in observability and SRE.