Overview
Tempo stores and queries distributed traces from applications and infrastructure components. It uses Garage S3 for trace storage and generates RED metrics (Rate, Errors, Duration) that are written to Prometheus.Configuration
Nixidy Module (nixidy/env/local/tempo.nix)
Architecture
Storage Backend
Tempo uses Garage S3 for trace storage:- Endpoint:
garage.storage:3900 - Bucket:
tempo-traces - Region:
garage - Path style: Forced (required for Garage)
garage-s3-credentials secret
Write-Ahead Log (WAL)
- Receive trace spans
- Write to WAL on PV
- Batch into blocks
- Upload to S3
- WAL compaction
Persistence
- Write-Ahead Log
- Temporary trace blocks
- Compaction cache
Trace Ingestion
OTLP Receivers
Tempo accepts traces via OpenTelemetry Protocol:| Protocol | Port | Endpoint |
|---|---|---|
| OTLP gRPC | 4317 | 0.0.0.0:4317 |
| OTLP HTTP | 4318 | 0.0.0.0:4318 |
Legacy Receivers
Tempo also supports legacy tracing protocols:| Protocol | Port | Purpose |
|---|---|---|
| Jaeger gRPC | 14250 | Jaeger native format |
| Jaeger Thrift HTTP | 14268 | Jaeger over HTTP |
| Jaeger Thrift Compact | 6831 (UDP) | Jaeger UDP |
| Jaeger Thrift Binary | 6832 (UDP) | Jaeger UDP |
| Zipkin | 9411 | Zipkin format |
Service Endpoint
- Internal URL:
http://tempo.observability:3200 - Namespace:
observability - Port: 3200 (HTTP API and metrics)
Metrics Generator
Tempo generates span metrics and writes them to Prometheus:Generated Metrics
Span Metrics (RED metrics):Benefits
- No instrumentation overhead - Metrics derived from existing traces
- Consistent cardinality - Service/operation labels from spans
- Alerting - Set alerts on trace-derived metrics
- Dashboards - Visualize service performance without separate metrics
Trace Flow
Traces flow through this pipeline:Example Trace Path
- Application emits OTLP traces
- OTel Collector (optional) processes/filters
- Tempo receives via gRPC:4317
- WAL writes to local disk
- S3 backend uploads blocks to Garage
- Metrics generator writes RED metrics to Prometheus
Integration
Grafana Data Source
Tempo is configured as a Grafana data source with correlation:Istio Tracing
Istio sends traces to OTel Collector, which forwards to Tempo:Traefik Tracing
Traefik sends traces directly to OTel Collector:Garage S3
Tempo depends on Garage for trace block storage:- Setup: Run
garage-setup.shto create bucket - Bucket:
tempo-tracesin Garage - Secret:
garage-s3-credentialsinjected into Tempo pod
Query API
Tempo exposes HTTP API at port 3200:Search Traces
Get Trace by ID
Metrics Query
Configuration Details
Compaction
Multi-tenancy
Storage Credentials
Tempo accesses Garage via S3 credentials:AWS_ACCESS_KEY_ID: Garage access keyAWS_SECRET_ACCESS_KEY: Garage secret key
garage-setup.sh.
Observability Workflow
Debugging with Tempo
- View metrics in Grafana Prometheus dashboard
- Identify slow service from RED metrics
- Click exemplar (link from metric to trace)
- Open trace in Tempo UI
- Analyze spans to find bottleneck
- View logs for error context (click span → logs)
Service Map
Grafana generates service dependency maps from Tempo traces:- Node graph showing service relationships
- Request rate on edges
- Error highlighting
Related Components
- Garage - S3 backend for traces
- Prometheus - Metrics generated from traces
- Grafana - Trace visualization
- Istio - Trace generation from mesh
- Traefik - Ingress tracing