Cloud & Software Development

Distributed tracing

Also known as: request tracing, distributed request tracing, end-to-end tracing

Distributed tracing tracks a single request, like a click on 'Buy now,' as it travels through all the services that handle it, recording how long each step took and where errors occurred.

The result looks like a timeline of the request's journey. While logs tell you what each service did, traces tell you how the pieces fit together, which is usually where modern outages hide.

Distributed tracing, explained at three levels

At home

Think of tracking a parcel online. You see when it left the warehouse, reached the sorting centre, went out on a truck, and arrived at your door, with times for each stop. Distributed tracing does the same for a single request inside an app, such as a click on 'Buy now,' recording every service it passes through and how long each one took.

At work

Distributed tracing follows individual requests as they travel through the many services that make up a modern application, recording each step's timing and any errors. The result is a timeline showing exactly where a request slowed down or failed. Businesses care because, when an app made of dozens of services is slow, tracing points engineers straight at the cause instead of leaving them to guess.

Real-world examples

At home

Thomas was learning microservices with a sample shopping app. When checkout took five seconds, a trace showed four of those seconds were spent in the recommendation service, which had nothing to do with checkout.

At work

Carlos is a site reliability engineer at a Canadian telecom. A billing page was timing out for some customers. Traces revealed a legacy service making 200 separate database calls per request, which his team fixed with a single batched query.

How it compares

featureDistributed tracingLogging
ViewOne request across many servicesEvents within one service
Best forFinding slow or failing stepsDetailed context about a specific event
Shared linkTrace IDUsually none unless added
Cost driverNumber of requests tracedVolume of log lines

Tracing shows the journey. Logs describe each stop.

For analysts

If your team spends incident calls debating which service is to blame, tracing is likely the missing piece. I'd start by tracing the two or three customer journeys that matter most to revenue.

History & origin

Google described its internal tracing system, Dapper, in a 2010 paper that became the blueprint for the field. Twitter open-sourced Zipkin, inspired by Dapper, in 2012, and Uber released Jaeger in 2017, which later graduated in the Cloud Native Computing Foundation. Competing instrumentation projects, OpenTracing and OpenCensus, merged into OpenTelemetry in 2019, and the W3C standardized a common Trace Context header so that traces could pass between different vendors' tools. In my view, standardizing the header mattered as much as any tool, because a trace that breaks at a vendor boundary isn't much of a trace.