When do dashboards hide the problem that traces reveal?
- Posted
- Tags
- observability, sre, distributed-systems
Dashboards tell me that something is wrong. Traces show where it went wrong for one specific request. Exemplars are the link that gets me from a spike on a chart to the trace behind it.
When do aggregate dashboards hide the real problem, and what do traces show that they can't? I've used both without really thinking about where one stops and the other starts, so today I sorted it out.
The question I had
When does a dashboard full of rolled-up numbers hide the problem that a trace would reveal?
What I found
A dashboard summarizes many requests into a few lines over time. A trace follows one request from start to finish, across every service it touches. That difference is exactly where dashboards fall short.
High cardinality gets dropped
Metrics get expensive when a label has lots of unique values, like user_id, order_id, or a query parameter. Every unique combination becomes its own time series, so metrics systems drop those labels to stay fast. The dashboard can say checkout is slow, but not that it's slow for one tenant or one region.
A trace doesn't have that problem. Each span can carry attributes like customer_id or app_version, so I can see that a spike only hits one customer or one release.
The slow tail has no names attached
Say 99% of requests take 50ms and 1% take 10 seconds. The average climbs from 50ms to about 150ms. That's noticeable, but it doesn't say who waited 10 seconds. A p99 line does better and shows the tail exists (I wrote about this in my p99 vs average latency post). Still, a percentile is just a number. It can't tell me which requests were slow, which users they belonged to, or what they were waiting on.
Traces keep the individual requests, so I can pull up the slow ones and look at them directly.
One catch: most setups don't keep every trace. With head-based sampling, the keep-or-drop decision happens when the request starts, so a rare slow request can get thrown away before anyone knows it was slow. Tail-based sampling decides after the request finishes, so it can keep the slow and failed ones.
Cascading failures look like everything broke at once
If service A calls B, and B calls C, a slow C can make all three light up on the dashboard at the same time. The charts show the damage but can't say which service started it.
A trace keeps the parent-child relationship between calls. I can see that A waited on B, B waited on C, and C spent 4 seconds on one database query. It also shows problems that look fine in aggregate, like a hidden fan-out, calls that run one after another when they could run in parallel, or the same query running in a loop (an N+1).
Side by side
| Dashboards (metrics) | Traces | |
|---|---|---|
| Purpose | How the system behaves over time; trends and alerts | The path of a single request |
| Question it answers | What is happening? ("Error rate jumped to 4%") | Where is it happening? ("The auth call timed out") |
| Granularity | Rollups: counts, averages, percentiles | Individual requests, broken into spans |
| Cardinality | Low; high-cardinality labels get dropped | High; each span carries its own context |
Where my epiphany came in
So when investigating, I reach for tracing, and when monitoring, just checking whether something breaks, I look at dashboards?
Pretty much. Dashboards tell me that something is broken. Traces tell me where, and usually point at why. It's a smoke detector and a fire investigator. I don't need an investigator inspecting the walls all day. I need the alarm to go off, and then someone to find where the fire started.
Two small corrections to my own version:
- Monitoring isn't someone staring at dashboards. Alerts fire from the metrics behind the dashboards, for example when p99 latency or error rate crosses a threshold. The dashboard is where I look once the page arrives.
- Traces narrow it down, they don't finish the job. A trace gets me to a service and an operation, like a specific query or outbound call. The logs attached to that span, or a profiler, take me to the actual line of code.
What a trace looks like
A trace looks like a sideways waterfall, or a Gantt chart. Each bar is a span, one unit of work like an API call or a database query. Bars start where the work started and stretch as long as it took. Nesting shows who called whom.
Trace 4bf92f35... Total: 1200ms Status: ERROR
/checkout (frontend) ---------------------------------------- 1200ms
├─ verify token (auth-service) ------ 150ms
└─ process payment (payment-service) ------------------------- 950ms
├─ SELECT balance FROM accounts (postgres) -- 50ms
└─ POST /v1/charges (external payment API) -- TIMEOUT ----- 900ms
- The root span is the top bar,
/checkout. It's the whole time the user waited. - Child spans are nested under it. Bars that start at the same time ran in parallel. Bars that start where another ended ran one after the other.
- The bottleneck is easy to spot: one bar takes up most of the width. Here it's the external payment call, 900ms of the 1200ms, and it timed out.
- Errors are usually marked in red, so I can skip the healthy spans.
Clicking a span opens its details:
- HTTP details: URL, method, status code.
- Database details: the query that ran.
- Business context: high-cardinality attributes like
customer_id,region, orapp_version. - Logs and errors: any log lines or stack trace recorded during that span.
The tools behind a trace
Tracing isn't one tool. It's a pipeline with a few layers, and each layer has its own choices.
1. Instrumentation: creating the spans
The code has to record spans somehow.
- OpenTelemetry (OTel) is the standard now. It came from merging two earlier projects, OpenTracing and OpenCensus. It gives each language an API and SDK, plus auto-instrumentation that wraps common libraries (HTTP servers, database drivers, gRPC) so I get spans without writing them by hand. I add manual spans and attributes for the parts that matter to the business.
- Vendor agents (Datadog, New Relic, Dynatrace, and others) do the same job with their own libraries. Most of them accept OpenTelemetry data now too.
- eBPF-based tools like Grafana Beyla, Odigos, and Pixie watch network calls from the kernel, so they produce spans with no code changes at all. The tradeoff is depth: they see the calls between services, but not what happens inside a function or the business attributes I'd add myself.
2. Context propagation: stitching services together
For spans from different services to end up in the same trace, every outgoing call has to carry the trace ID along. The standard is the W3C Trace Context traceparent header. Older Zipkin setups use B3 headers (X-B3-TraceId and friends). If one service in the chain doesn't pass the header on, the trace breaks in two.
A service mesh (Istio, Linkerd) can create spans for every hop between services, but it can't do the propagation alone. The app still has to copy the incoming header onto its outgoing calls, because the proxy can't tell which outgoing call belongs to which incoming request.
3. Collection: moving and sampling the data
- The OpenTelemetry Collector sits between the apps and the backend. It receives spans (usually over OTLP, OpenTelemetry's protocol), batches them, filters or scrubs attributes, and sends them to one or more backends. Because the apps only talk to the collector, switching backends doesn't mean re-instrumenting the code.
- It's also where tail-based sampling usually happens. The collector holds all the spans of a trace until it's complete, then keeps it if it was slow or failed.
4. Backends: storing and viewing traces
| Type | Examples | Notes |
|---|---|---|
| Open source | Jaeger, Zipkin, Grafana Tempo, SigNoz | Jaeger came out of Uber and Zipkin out of Twitter. Tempo keeps traces in cheap object storage and is built to pair with Grafana dashboards. |
| Commercial | Datadog APM, Honeycomb, New Relic, Dynatrace, Splunk APM, Elastic APM | Hosted, with traces, metrics, and logs in one place. Honeycomb leans hard into high-cardinality queries. |
| Cloud provider | AWS X-Ray, Google Cloud Trace, Azure Monitor Application Insights | Easiest when everything already runs on that cloud. |
All of these trace back to Dapper, a paper Google published in 2010 describing how it traced requests across its own services. Zipkin was built from that paper, and most of the ideas above (traces, spans, sampling) started there.
The way I'd put it together today: instrument with OpenTelemetry, propagate W3C Trace Context, run the OTel Collector, and pick whichever backend fits the budget. The first three stay the same even if the backend changes.
Getting from a dashboard spike to a trace
The link between the two is called an exemplar: a trace ID attached to a metric data point. When the service records a request's latency, it also saves the trace ID of an example request that landed in that bucket.
In practice it goes like this:
- Alert. p99 latency for
/checkoutjumps from 200ms to 8.5 seconds and pages me. - Look. On the latency chart, exemplars show up as small dots near the spike.
- Jump. Hovering a dot shows its
trace_idand a "View trace" link. - Fix. The trace shows, say, a 4.8-second lock wait on one database call, so I know exactly where to look.
Two things I want to remember:
- Exemplars are samples. I get a handful of example traces, not every request in the spike. Usually that's enough to see the pattern.
- They only work if metrics and traces share trace IDs. The service has to record the trace ID along with the metric, which is easiest when both come from the same instrumentation, like OpenTelemetry.
Takeaway
Dashboards and alerts tell me that something is wrong. Traces show me where it went wrong for real requests, with the context a rolled-up number has to throw away. I don't pick one over the other. I use exemplars to go from the spike to the trace behind it.