1. Distributed tracing in brief #
Following a request across services.
Traces, spans and context #
Available in: ✓ OSS ✓ Enterprise ✓ Cloud Tempo open source, Enterprise Traces and Grafana Cloud Traces
In a microservice architecture, a user request often goes through dozens of services. A trace represents the full path of that request; it is made of spans, each corresponding to an operation (HTTP call, SQL query, internal processing) with a duration, attributes and a status. All the spans of a trace share the same TraceID, propagated from one service to the next in headers (W3C traceparent).
# En-tête W3C propagé entre les services
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01
# ver <------- trace-id (16 octets) -----> <-span-id-> flags2. Why Tempo? #
A simple, cost-effective backend.
The philosophy #
Grafana Tempo needs only object storage (S3, GCS, Azure Blob, MinIO): no database to manage, no heavy index. You find a trace by its TraceID or search for it with TraceQL on attributes. It accepts many protocols: OTLP, Jaeger, Zipkin.
| Criterion | Grafana Tempo | Jaeger | Zipkin |
|---|---|---|---|
| Storage | Object (S3, GCS, Azure) or local | Elasticsearch, Cassandra, OpenSearch | Elasticsearch, Cassandra, MySQL |
| Cost at scale | Very low | Medium to high | Medium |
| Query language | TraceQL | UI/API filters | UI/API filters |
| Grafana integration | Native (logs, metrics, profiles) | Data source | Data source |
| Input protocols | OTLP, Jaeger, Zipkin | OTLP, Jaeger | Zipkin |
3. The architecture #
Write and read paths.
The components #
| Component | Role |
|---|---|
| Distributor | Receives spans (OTLP, Jaeger, Zipkin), groups them by TraceID and sends them to the ingesters |
| Ingester | Assembles traces in memory and in the WAL, writes blocks to storage |
| Compactor | Merges blocks, applies retention |
| Query Frontend | Splits searches into parallel sub-queries |
| Querier | Looks for traces in the ingesters and in storage |
| Metrics-generator | Derives metrics (service graphs, span metrics) from traces |
Deployment modes #
tempo -config.file=tempo.yaml -target=all # monolithique (tests, petits volumes)
tempo -config.file=tempo.yaml -target=distributor # microservices
tempo -config.file=tempo.yaml -target=querier
tempo --versionGood practice: Start in monolithic mode; switch to the tempo-distributed chart when ingestion exceeds a few tens of MB/s.