Skip to main content
Lexicon
Lexicon
Distributed Tracing

Distributed Tracing

Difficulty: Intermediate
6 min read
Updated 2026-08-30

In plain English

Plain definition

Distributed tracing is a way of following one request as it travels through several separate services, so that engineers can see the whole journey rather than only what happened inside one component. Each service records its part of the work as a small timed record, and those records are linked together so the full path can be reconstructed and viewed as a single timeline.

How spans make up a trace

A unique trace identifier is generated at the start of a request and propagated across process, network and service boundaries in headers or context metadata. Each unit of work performed while handling that request is recorded as a span, containing a start time, duration, service name, operation name and optional attributes. Spans reference a parent span, forming a tree (or trace) that represents causal and temporal relationships between operations. Trace data is usually exported to a collector, sampled and stored, then queried later by trace identifier to reconstruct full request behaviour, including cross-service latency and error propagation.

Faster incident diagnosis

When a production system is built from many independently deployed services, a single user-facing request may traverse several APIs, queues, databases and third-party calls. Without distributed tracing, engineers investigating latency or errors must correlate logs and metrics manually across systems, which is slow and error-prone. Tracing gives a direct, request-scoped view of where time is spent and where failures originate, which shortens incident diagnosis and supports capacity and dependency analysis.

Tracing beside logs and metrics

Distributed tracing sits alongside logging and metrics as one of the three commonly cited observability pillars. What sets it apart is that it carries request-scoped context across service boundaries. It depends on consistent context propagation conventions (for example, a shared trace header format) being honoured by every service, proxy, and messaging layer a request passes through. It typically integrates with an instrumentation library or SDK inside each service, a collector or gateway that receives span data, and a backend store and query interface used to visualise traces. Whether traces are complete and trustworthy depends on three architectural choices: the sampling strategy, compatible propagation formats, and clock synchronisation across hosts.

A slow checkout

A checkout request enters an API gateway, which calls an inventory service, a pricing service and a payment service. With distributed tracing enabled, the gateway generates a trace identifier and passes it to each downstream call. Each service creates a span recording its own processing time and reports it back to a shared collector. If the payment service is slow, the resulting trace view shows that span taking disproportionately long relative to the others, pointing engineers directly at the affected component rather than requiring them to inspect every service’s logs individually.

Tracing is more than logging

Distributed tracing is often mistaken for logging with extra detail. Logs are typically unstructured or loosely structured events emitted independently by each service, with no inherent cross-service linkage unless deliberately correlated. Tracing is built differently. It depends on a propagated identifier and span hierarchy that exists specifically to reconstruct causal relationships between operations across services. A service that logs extensively but does not propagate or honour trace context will not produce usable distributed traces, regardless of log volume.

Terms used with tracing

  • Span is a single timed unit of work within a trace.
  • Trace context propagation is the mechanism by which trace identifiers are passed between services.
  • Sampling is the strategy that decides which traces are recorded and retained.
  • Observability is the broader discipline combining tracing, metrics and logging.
  • Instrumentation is the code or agent that generates spans within a service.

Further Reading

If you are evaluating or implementing distributed tracing, read the current platform documentation for the specific tracing tool or standard you use, because propagation formats, sampling defaults and collector configuration vary by implementation and by version. Confirm exact configuration options and supported protocols against the vendor’s current documentation before making architectural decisions.

About this page

Credited to

Dates

Published

Corrections

No corrections are listed for this page. Some review sweeps corrected pages without naming each one; those are in the corrections log.

Was this useful?

Reports go to the site owner and are used to correct pages. Corrections are listed at /corrections.

Found this useful? Follow KBY for more like it.

More from KBY that goes with this term.