Waterfall, critical path, service graph and latency percentiles

Distributed Trace Viewer

Open OpenTelemetry, Jaeger or Zipkin trace JSON to see the span waterfall with self time and the critical path, the service call graph, latency percentiles per operation, a side-by-side comparison of two traces, and a redacted export.

Trace file

Drop trace JSON files

OTLP/JSON (also JSON Lines), Jaeger export, Zipkin v2 array. Up to 96.0 MB.

Distributed Trace Viewer

Operator: Abdulla Al Fahad. How tools are built and checked

A latency complaint arrives with a trace attached as a JSON file, and the backend that produced it is not available to you. This viewer opens that file directly. It reads OpenTelemetry OTLP/JSON, Jaeger exports and Zipkin v2 arrays, draws the span waterfall, and answers the question a waterfall alone does not: which spans was the request actually waiting for? Files up to 96 MB and 250,000 spans are read, with trees up to 3,000 levels deep.

Key features

  • Waterfall with collapsible hierarchy, service colours, error markers, span attributes, resource attributes and events
  • Self time per span with parallel children counted once, and critical-path time per span computed by the last-finishing-child method
  • Clock-skew detection between services, with an optional adjustment that centres a child inside its parent
  • Service dependency graph with call counts and errors, p50 to p99 per operation across all traces, a comparison of two traces and attribute search

How spans are normalised and how the critical path is found

OTLP/JSON stores times as nanosecond strings of 19 digits, which a JavaScript number cannot hold exactly, so they are converted to microseconds through BigInt. A file written by the OpenTelemetry file exporter has one JSON object per line and is read line by line. Jaeger exports keep the service name in a processes table and the parent in a CHILD_OF reference; Zipkin v2 spans carry the service in localEndpoint and report times in microseconds.

The critical path starts from the end of a span and walks backwards. The child that finished last is on the path; the time between its end and the current point belongs to the parent; the walk descends into the child and continues from the child's start with the child that finished last before it. Children that overlap an already chosen one ran in parallel and are skipped. Child intervals are clipped to their parent, so the segments add up to the root's duration.

How it works

Clock skew is detected only across services, since spans inside one process share a clock. When a child of a different service starts before its parent or ends after it and is not longer than the parent, the whole child subtree is moved so the child sits centred in the parent. A child longer than its parent cannot be fitted and is counted as unfixable rather than guessed at.

When this helps

  • Two services run on hosts whose clocks differ by about 35 ms, so in the raw waterfall an inventory call appears to start 35 ms before the checkout span that made it. With the skew adjustment on, the page moves the whole inventory subtree so the call sits centred inside its caller, and it counts any child that is longer than its parent as unfixable instead of shifting it, so the number of spans it could not fit is visible before you trust the picture.
  • A team preparing a dependency review loads a day of 300 exported POST /order traces and opens the Services view. Call counts per edge show the notification service is called four times per order rather than once, and the error column shows that all the failures sit on the edge to the tax service, which narrows the review to two pairs of services before anyone reads a single waterfall.
  • A support engineer must attach a slow trace to a vendor ticket. She exports with attribute redaction set to the allowlist, so only keys such as http.method, http.route and db.system keep their values and db.statement, user ids and URLs become [redacted]; she then reads the span names and event messages by eye, because redaction works on attribute keys and token shapes and cannot see a name that holds a customer email.

Opening a file

  1. Drop one or more trace JSON files, or start with the built-in pair of checkout traces.
  2. Pick a trace, then search with db.system=mysql, http.status_code~5 or plain text, and tick Errors only to see failures.
  3. Click a span for its attributes and times, and open Percentiles, Services or Compare for the other views.
  4. Choose a redaction level in Export before sharing the data.

Example

Two checkout traces across frontend, cart, pricing, payments and ledger (the built-in illustrative data)

Trace 1 (a cache miss): frontend GET /checkout 0 to 420 ms; pricing POST /price 130 to 330 ms in parallel with payments POST /charge 140 to 400 ms; ledger INSERT entries 136 to 395 ms, starting 4 ms before its parent
Trace 2 (a cache hit): 190 ms in total

Waterfall details for trace 1, with clock-skew adjustment on

Critical path (420 ms): ledger INSERT entries 259 ms, cart SELECT carts 70, frontend GET /checkout 50, cart GET /cart 40, payments POST /charge 1
Off the critical path: pricing POST /price (200 ms) ran in parallel with payments
Clock skew: 1 cross-service span (payments to ledger); errors: 2 (payments, ledger)
Percentiles for frontend GET /checkout over both traces: p50 190 ms, p95 420 ms

Tips for best results

  • Use the Compare view with one trace from before a deploy and one from after: it sorts spans by size of change, so a new span that exists in only one trace shows up beside the ones that merely got slower.
  • Search with key=value for an exact attribute match and key~text for a substring, for example http.route~/api/orders or net.peer.name=db-primary.
  • Sort out clock skew before reading start times across services: with the adjustment off, a child can seem to start before its caller.
  • Self time is the number to chase inside one service; critical-path time is the number to chase across services.

Limits

Percentiles from one or two traces are just those spans. The page says so, but for p95 and p99 you need an export with many traces of the same operations.

Sampling hides spans: a trace from a sampled pipeline may lack the spans that would explain a gap, and the gap then shows up as parent self time.

Redaction masks attribute values by key name and token shape. It cannot know that a span name or an event message contains personal data, so check those before sharing.

Span times from different machines are only as good as their clocks. The skew adjustment is a heuristic that makes the picture consistent, not a measurement of the real offset.

Common errors and how to fix them

This JSON is not an OTLP export (resourceSpans), a Jaeger export (data[].spans) or a Zipkin v2 array
The file is some other JSON. Export the trace from the UI's JSON option, or take the response of the query API for a single trace, and drop that. Spans whose parent is missing become extra roots, and duplicate span ids and parent cycles are reported instead of hidden.

Best practices

  • Export with redaction before attaching a trace to a ticket, and keep the unredacted file inside the team.
  • Load a day's worth of traces for one operation to read percentiles, then open the slowest trace from the waterfall tab.

Frequently asked questions

Are the percentiles interpolated?

No. They use the nearest-rank method: the p-th percentile is the sorted value at rank ceil(p/100 x n). For ten durations 1 to 10, p50 is 5, p90 is 9 and p95 is 10. That differs from tools that interpolate between ranks, and the page names the method beside the table.

What happens to a trace with 250,001 spans or a file over 96 MB?

It is refused with a message that names the limit and suggests splitting the file, rather than loading part of it silently. Parent cycles, a span that is its own parent and duplicate span ids are reported and handled, so a damaged export still opens.

Why do some spans show 0 critical time although they are slow?

A span is on the critical path only for the stretch the request waited on it alone. A slow span that ran in parallel with a longer sibling, like the 200 ms pricing call in the example, contributes nothing to the total latency.