Developer and Text Tools

How to Read a Distributed Trace and Find What Made a Request Slow

A guide to spans, waterfalls, self time and the critical path in OpenTelemetry, Jaeger and Zipkin traces, with a method for finding slow and failing calls.

Saizul Amin
Saizul Amin2 Nov 2026 · 3 min read
How to Read a Distributed Trace and Find What Made a Request Slow

How to Read a Distributed Trace and Find What Made a Request Slow

A slow request in a system of microservices is a mystery story with many suspects. Logs tell you what each service did; metrics tell you averages. A distributed trace tells you what happened to one specific request, step by step, across every service it touched. This guide explains how to read one and find the real culprit, using the free distributed trace viewer.

Traces and spans

A trace is the whole journey of one request. It is made of spans: named, timed pieces of work such as "POST /checkout", "SELECT orders" or "PaymentService/Charge". Each span records a start time, a duration, the service that produced it, attributes such as the HTTP status or database system, and a link to its parent span. Parent links turn the spans into a tree.

OpenTelemetry is now the common way to produce traces. Older systems use Jaeger or Zipkin, and their JSON formats differ in detail but carry the same information.

The waterfall

The standard view draws every span as a horizontal bar on a shared timeline, indented under its parent. Read it from the top: the root span covers the whole request, its children show what it delegated, and so on down. Bars that sit under each other ran one after another; bars that overlap ran in parallel.

Duration lies, self time does not

A gateway span that lasts 400 ms looks guilty, but it may have spent 380 ms waiting for other services. Self time is a span's duration minus the time covered by its children. Large self time means the service itself was busy: computing, serialising, waiting on a lock or a resource that was not traced. Comparing self time per service is often the fastest way to see where work really happened.

The critical path

Not every slow span matters. If two calls run in parallel, making the shorter one faster changes nothing. The critical path is the chain of spans that decided the total duration: starting from the root, follow the child that finished last, then that child's last-finishing child, and so on. Only work on this path delays the user. When planning an optimisation, start with the longest span on the critical path.

A method for slow requests

  1. Open the trace and note the total duration.
  2. Look at the critical path and list the three spans with the most time on it.
  3. For each, check self time: is it busy itself, or waiting for something deeper?
  4. Read the attributes: database statements, HTTP URLs, message sizes.
  5. Look for patterns such as many small sequential calls, which usually means a loop that should be one batched request.

A method for errors

Filter spans with error status, or search attributes such as http.response.status_code=500. Find the deepest failing span: errors usually propagate upwards, so the root says "502" while the real cause is a "402 payment declined" four levels down. Span events often carry the exception type and message.

Common shapes to recognise

  • Staircase: dozens of short spans one after another, the classic N+1 query problem.
  • Long gap: a parent with a large empty space before its children start, often time spent in a queue or connection pool.
  • Fan-out: many parallel children; the slowest one decides the total.
  • Retry: the same operation repeated with growing gaps, revealing backoff.

When a trace looks impossible

Children that start before their parents usually mean clock skew between hosts. Missing children mean a service was not instrumented or did not propagate the trace context header. Both are worth fixing because they make every later investigation harder.

Limits

One trace shows one request. To know whether a problem is typical, compare several traces or look at latency percentiles in your monitoring system. Sampling means many requests are never traced, and spans only cover code that is instrumented, so time spent in untraced libraries appears as self time of the nearest traced parent.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages