Connecting telemetry from request to investigation
easy 7 minMetrics summarize repeated observations, logs record individual events and traces connect spans for one operation.
Video lesson · Chapter 1 of 4
A histogram bucket leads to one slow trace
Theory
Read or listen first. About 2 min.
What it is
Metrics summarize repeated observations, logs record individual events and traces connect spans for one operation. An exemplar can attach an observed trace context to a metric observation. This lets an engineer move from a distribution to a concrete request without adding a unique trace ID as a metric label.
Why it exists
A latency histogram clearly shows a slow tail, but most exemplar links open empty results. Match emission, sampling, export and retention boundaries before blaming the application. Some sampled data may expire sooner than its metric. Align the pipelines and verify with known requests. A handful of retained examples helps explain a mechanism but does not estimate its prevalence.
When a fresh trace is also missing, inspect sampling decisions, collector loss and trace-ID propagation before extending retention.
A histogram bucket leads to one slow trace
Inside this chapter
- Metrics (Aggregatable data)
- Counters, gauges and distributions summarize observations over a population. Define denominator, units, collection window and reset handling before interpreting a trend.
- Logs (Discrete events)
- An event records something that happened at a particular boundary. Severity alone cannot establish customer impact. Link events to outcomes with stable context and sampling awareness.
- Traces (Request lifecycles)
- A trace connects spans for one operation. Parallel children overlap and asynchronous work may outlive the parent. Read the critical path before adding span durations.
- Structured Logging best practices
- Stable field names, timestamps, outcome and request context make logs queryable. Prefer bounded, relevant fields and avoid sensitive payloads when identifiers and outcomes suffice.
- Log Aggregation patterns
- Collection agents buffer and forward events to storage. Backpressure or dropped records can make a quiet dashboard misleading. Monitor the telemetry path’s own loss and lag.
- Distributed Tracing with OpenTelemetry
- OpenTelemetry propagates context and exports spans through configurable pipelines. A missing parent may indicate context loss, sampling or export failure rather than an absent dependency.
- Exemplars: Linking Metrics to Traces
- Exemplars connect selected metric observations to trace context. They support investigation without turning every trace identifier into a separate metric series.
How it works
Step through the idea, or press Play.
Measure a request. An instrumented request records its duration and carries trace context when available.
Understand it
Worked incident
A histogram bucket leads to one slow trace
| Observation | Slow traces found per 10 exemplar lookups (traces) | Interpretation |
|---|---|---|
| Baseline | 10 | Sampled traces and their exemplars share a retention window. |
| Incident | 2 | Trace retention becomes shorter and old exemplar links lose their targets. |
| After intervention | 9 | Align retention or restrict the investigation window. Confirm links work at several ages. |
Choose the next investigation
Summary
The whole topic in one minute.
A high-cardinality label creates an unbounded set of series. Exemplars preserve a path to individual evidence with bounded metric dimensions.
When a fresh trace is also missing, inspect sampling decisions, collector loss and trace-ID propagation before extending retention.