# Distributed Tracing

> Following one request through each part of an app. Each step shows its time.

**Field:** Infrastructure  
**Category:** Monitoring & Observability  
**Also known as:** Tracing, Trace, Span, Request Tracing

## Think of it like

It is like a parcel tracker. You see every stop the box made and how long it waited at each one.

## Definition

Distributed tracing follows one request as it moves through many services. The whole journey is called a trace. Each step inside it, like a database call, is a span with a start time and an end time. A shared trace ID is passed along with the request, so the steps can be joined up. Drawn as bars, a trace shows where the time went.

## Example

Checkout takes 3 seconds. The trace shows 2.6 of them are one database query in the stock service, so Jack fixes that query.

## Example code

```http
traceparent: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
```

The header that carries the trace ID from one service to the next, so the steps can be joined.

## Why it matters

Many apps are made of lots of small parts. This is the one way to see which part made a request slow.

## Common mistake

Tracing only some services. The trace then has gaps, and the slow step is often in the gap.

## Three principles

- **One request.** A trace follows a single journey.
- **Spans.** Each step has its own start and end.
- **Pass the ID.** Every service sends the trace ID on.

## Related terms

- [Observability](https://learn.benibix.com/term/infrastructure/observability)
- [OpenTelemetry (OTel)](https://learn.benibix.com/term/infrastructure/opentelemetry)
- [Logging](https://learn.benibix.com/term/infrastructure/logging)
- [Metric (Monitoring)](https://learn.benibix.com/term/infrastructure/metric)
- [Microservices](https://learn.benibix.com/term/development/microservices)
- [Latency](https://learn.benibix.com/term/infrastructure/latency)
- [Application Performance Monitoring (APM)](https://learn.benibix.com/term/infrastructure/application-performance-monitoring)

![Three panels side by side about the same slow request. Logs: three lines of text, each with a time and a message, the last one an error. Metrics: a line chart of response time over an hour, with a spike. Traces: a set of stacked bars, one per step of the request, where the database bar is the longest.](https://learn.benibix.com/diagrams/inf-telemetry-signals.svg)

---

Source: https://learn.benibix.com/term/infrastructure/distributed-tracing
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
