Reading a Trace: the Waterfall Is the Most Misleading UI in Observability
The Critical Path, Not the Longest Bar
Define it precisely, because the loose definition ("the slow part") is what causes the mistake. The critical path of a trace is the set of intervals for which a 1ms reduction reduces the root span's duration by 1ms. Everything else has slack — you can shorten it, lengthen it a little, or delete it entirely, and the user's latency does not move. It is not a set of spans; it is a set of time intervals, and a single span can be partly on it and partly off it.
Here is a real-shaped checkout trace. Read it the way you normally would, and pick the span to optimize:
0ms 512ms
POST /checkout ████████████████████████████████████████████████████ 512ms
├─ auth.verify ██ 10ms
├─ cart.load █████ 44ms
├─ inventory.check █████████████ 126ms
├─ reco.fetch ███████████████████████████████ 300ms
├─ pricing.quote ██████████████████████████ 252ms
│ ├─ fx.rate ██ 12ms
│ └─ rules.eval ████████████████████████ 230ms
└─ payment.authorize ██████ 52msThe eye goes straight to reco.fetch: 300ms, 59% of the request, by far the longest child bar. It is also the one span in this trace that contributes exactly zero to the user's latency. It starts at t=14 and finishes at t=314; nothing downstream consumes its result before t=314, and the request is still busy until t=512. Make it instantaneous and the checkout still takes 512ms.
Finding the critical path by eye takes three rules and about ten seconds:
Start at the root's end and walk backwards. Of the root's children, the one that ends last is on the critical path — here
payment.authorize, ending at t=498. The 14ms between its end and the root's end is the parent's own work.Jump to that span's start, and repeat at the same level.
payment.authorizestarts at t=446. Which sibling ends last before 446?pricing.quote, at t=442. Continue:inventory.check(ends 186) before pricing's start of 190,cart.load(ends 58) before 60,auth.verify(ends 12) before 14.reco.fetchends at 314 — which is insidepricing.quote's interval, already covered by a span deeper on the path. It never gets selected. That is what "off the critical path" means mechanically.Recurse into every span you selected. Inside
pricing.quote:rules.evalends last (438), thenfx.ratebefore it. Both are on the path. The answer isrules.eval— 230ms, a bar 25% shorter than the one your eye picked, two levels down, inside a span nobody was looking at.
Optimizing a span with slack is the most common wasted quarter in performance work, and a waterfall actively recommends it. "Longest bar" and "on the critical path" are different questions, and only one of them is about the user.
The Gap — Unaccounted Time Inside a Parent
The second-most-useful reading skill is subtraction. A parent span's duration minus the union of its children's intervals is time the parent spent doing something that nothing instrumented:
order.submit SERVER 400ms
├─ db.query users CLIENT 8ms
├─ db.query orders CLIENT 31ms
└─ POST /inventory/reserve CLIENT 81ms
children = 120ms
UNACCOUNTED = 280ms ← 70% of the request280ms is not a mystery; it is a short list of suspects, and they are distinguishable:
| Cause of the gap | How you tell |
|---|---|
| Connection-pool wait | The gap sits immediately before a CLIENT span, scales with concurrency, and disappears at low load. HikariCP, database/sql, and most HTTP clients emit pool metrics — correlate the gap with pool pending count. Some instrumentations emit an explicit acquire span; most don't. |
| TLS handshake / DNS | Gap before the first CLIENT span to a given peer only, and absent on subsequent requests in the same process. A full TLS 1.3 handshake is one RTT; 1.2 is two. If you see 200ms here, it is DNS, not TLS. |
| Thread-pool / accept-queue wait | The request sat in a queue before a worker touched it. Crucially this is often outside the SERVER span entirely — the span starts when your handler starts, not when the bytes arrived — so it shows up as a CLIENT/SERVER gap upstream (below), not as a gap here. |
| GC pause | The gap lands at the same wall-clock instant in several concurrent traces on the same host. That correlation is the tell, and it is the one gap cause you cannot diagnose from a single trace — cross-reference the process's GC metrics. |
| Serialization of a large payload | Gap after the last child, scaling with response size. A 6MB JSON response encoded at ~150MB/s is 40ms of pure CPU that no HTTP client span covers. |
| Uninstrumented work | A library call nobody wrapped — a template render, a crypto operation, a Redis client your auto-instrumentation doesn't recognize. Indistinguishable from the others by shape; the fix is to add a span and look again. |
There are two gaps with a sharper meaning, and both are worth internalizing:
The CLIENT/SERVER gap is network plus queueing — and this is what SpanKind (see The Span) is for. A single RPC produces two spans, a CLIENT span in the caller and a SERVER span in the callee. Subtract them:
svc-a POST /reserve CLIENT start 120.000 end 201.000 81ms
svc-b POST /reserve SERVER start 158.000 end 199.000 41ms
▲ ▲
38ms request-side 2ms response
transit + accept queue transit
+ thread-pool wait38ms before your handler even started. If the two hosts are in the same AZ, that is not the wire — that is a saturated worker pool, and no dashboard on either service will show it, because svc-a reports "81ms to svc-b" and svc-b reports "41ms". Caveat this subtraction is only as trustworthy as the two hosts' clocks. NTP-disciplined hosts in one datacenter typically agree within a few milliseconds; across regions or on a noisy VM, tens of milliseconds of skew is ordinary. Treat a 38ms gap as signal and a 3ms gap as noise, and be suspicious of a negative gap — a SERVER span that appears to start before its CLIENT parent is pure skew, and some UIs silently clamp it, which hides the real number in both directions.
The gap inside a span with no children is your own code. rules.eval above is 230ms of leaf. There is no further hop to blame and no deeper span to open. This is the exact boundary where distributed tracing ends and a profiler begins (see Where Tracing Stops) — and adding twenty more manual spans inside that function to find the hot loop is just hand-rolled profiling with a per-span cost you'll pay on 100% of traffic forever.
Count, Not Duration — the N+1
The canonical finding that only a trace can produce:
GET /cart/9f3a 1,043ms
└─ cart.render 1,021ms
├─ inventory.lookup sku=A81 3ms
├─ inventory.lookup sku=B02 3ms
├─ inventory.lookup sku=C77 2ms
├─ ... 337 more, each 2–4ms, strictly sequential ...
└─ inventory.lookup sku=Z14 3msEvery individual span is healthy. p50 for inventory.lookup is 3ms, p99 is 5ms, its error rate is zero, and its dashboard is green. The service owner will correctly tell you nothing is wrong with their service. The pathology exists only in the arity of the parent-child relationship — a property of the graph, which is precisely the thing a per-span metrics pipeline cannot represent. There is no aggregation over individual spans that recovers it.
Async Spans Lie in a Waterfall
A waterfall draws every span on one wall-clock axis and implies that horizontal position means "waiting." For asynchronous work that implication is simply false, in three distinct shapes:
| Shape | What the waterfall shows | How to read it correctly |
|---|---|---|
| Fire-and-forget — an audit write the handler doesn't await | A child bar overlapping the parent, sometimes extending past the root's end | It has infinite slack; it is never on the critical path. If the child outlives the root, the root span was ended before its child — expect the backend to have received the root first and the child late (the Trace part's assembly problem). |
| Queue producer → consumer, joined by parent/child | One "trace" whose duration is minutes or hours, dominated by a flat gap | The trace duration is meaningless as a latency number. What you want is two intervals: producer→consumer start (queue dwell time) and consumer duration. Semantic conventions give you messaging.operation.type = publish / receive / process; read those, not the bar. |
| Joined by a Link instead (see The Span) | Often nothing at all — many UIs render links faintly or not on the timeline | This is the correct modelling for batch consumers (one consumer span, N links to N producers) precisely because there is no single causal parent. A link says "related to," not "waited for." Never read a linked span as latency. |
Retries Are Visible, and They Are the Best Thing in a Trace
├─ POST payments.authorize CLIENT t= 40 → 1040 1000ms ERROR timeout
├─ POST payments.authorize CLIENT t=1140 → 2140 1000ms ERROR timeout
└─ POST payments.authorize CLIENT t=2340 → 2951 611ms OK
▲ ▲
gaps: 100ms, 200ms — exponential backoffThree sibling CLIENT spans to the same peer, same operation, with gaps that double: that is a client retry policy, visible without reading a line of code, including its backoff constant and its attempt cap. Now consider what a metrics dashboard shows for the same event: payments sees a 3× spike in request rate and an elevated error rate. The rate spike is real and will get investigated as a traffic surge. The cause — a timeout misconfiguration in a caller, amplifying one user request into three backend requests at exactly the moment the backend is already struggling — is invisible in every metric on both sides. Retry amplification during an incident is one of the standard ways a brownout becomes an outage, and the trace is the only artifact that shows it as one request.
Comparing Traces Beats Reading One
The workflow that actually resolves incidents is rarely "open the slow trace and stare." It is: pull a fast trace and a slow trace for the same endpoint and diff their structure. Latency differences are noisy and hard to attribute; structural differences are not. A span present in one and absent in the other, or a child count of 4 versus 340, localizes the problem in seconds — and it answers "what is different about the slow ones," which is the question you actually have.
Jaeger has shipped this since 1.7: its trace-comparison view condenses each trace into a tree of unique service/operation paths and colour-codes the diff — nodes present only in A, only in B, and nodes present in both with a different span count (the N+1 detector, essentially). CRISP's aggregate mode is the same idea applied to critical paths over a whole endpoint's traffic. Both are answering a question about a population of traces, which is worth noticing: the single-trace waterfall is the least powerful view your backend offers, and it is the default.
Service Dependency Graphs, and Why They Understate
Every backend derives a service graph from parent-child span pairs that cross a service.name boundary. Jaeger exposes two: a System Architecture graph of one-hop dependencies, and a Deep Dependency Graph of transitive ones. Grafana Tempo builds the same thing in its metrics-generator via the service_graphs processor (equivalently, the Collector's servicegraph connector), emitting request count and duration per edge.
These are genuinely valuable for one thing: discovering the call graph nobody has documented, and finding the edge that shouldn't exist — the checkout service talking directly to the user-profile database, the "deprecated" service still taking 400 rps. Their limit is the same limit as everything else in this guide: they show you what was sampled. A code path that fires on 1 request in 10,000, at 1% head sampling, contributes an edge roughly once per million requests — and a graph built from a batch job over stored spans (Jaeger on Cassandra or Elasticsearch computes its dependency links with an offline Spark job, spark-dependencies, because scanning the span store online is prohibitive) may simply not contain it. An absent edge is not evidence of an absent dependency, and that asymmetry matters most for exactly the rare, expensive call paths you were hoping to discover.
Errors: the Status Is Not the Story
A failed request produces a red root span reporting HTTP 500 and, in a well-instrumented system, a chain of errored spans down to the span that actually threw. Every span on that chain is "the error." The useful one is the deepest one — the first span whose status went to ERROR without any errored child to blame. Everything above it is propagation.
Two things make this harder than it sounds. First, error status does not reliably propagate: a service that catches an exception, logs it, and returns a degraded-but-200 response leaves its own span UNSET while a deeper span is ERROR — so "deepest errored span" can appear under an apparently healthy parent. Second, the exception detail lives somewhere the waterfall doesn't show: historically a span event named exception, carrying exception.type, exception.message, and exception.stacktrace (see The Span). You have to expand the span to see it, and many UIs collapse events by default.
- Guarantees: A complete trace contains enough information to reconstruct the critical path, the fan-out arity at every node, retry structure, and the per-hop network/queueing gap — all of which are properties of the graph, and none of which survive aggregation into per-service metrics.
- Does not guarantee: That the waterfall shows you any of them. It renders start time and duration, which encodes the critical path only implicitly, renders async work on the same axis as blocking work, makes a 340-way fan-out look like a scroll bar, and shows an unaccounted gap as empty space with no label. Reading a trace is a skill precisely because the default view is a per-span rendering of a graph-shaped fact.