Tempo Config Generator
Generate production-ready Grafana Tempo configuration files with storage backends, receivers, compaction, and metrics generation.
Tempo Configuration
Overview
The Tempo Config Generator helps you build production-ready Grafana Tempo configuration files in YAML format. Tempo is a distributed tracing backend from Grafana Labs, designed to ingest and store trace data at scale with minimal resource overhead. It is fully compatible with OpenTelemetry, Jaeger, Zipkin, and OpenCensus instrumentation libraries.
Unlike monolithic tracing solutions, Tempo follows a disaggregated architecture with distinct components for distribution, ingestion, compaction, and querying. This generator produces syntactically correct tempo.yaml files with all major subsystems configurable, including storage backends, metrics generation, compaction policies, search settings, and authentication. Whether you are running Tempo locally for development or in production on Kubernetes, this tool streamlines your configuration workflow.
How It Works
1. Configure Receivers: Enable trace ingestion endpoints for OTLP (gRPC and HTTP), Jaeger (Thrift HTTP, gRPC, Thrift Compact), Zipkin, and OpenCensus. Each receiver binds to a specific port on the distributor and handles protocol-specific deserialization.
2. Select Storage Backend: Choose between local filesystem, Amazon S3, Azure Blob Storage, or Google Cloud Storage. Each backend type requires specific authentication and connection parameters. The storage configuration is central to Tempo and affects both ingester WAL and backend block storage.
3. Set Compaction Policies: Configure how Tempo compacts small trace blocks into larger ones. The compaction window, maximum block size, and retention periods determine how long trace data is available and how efficiently it is stored.
4. Enable Metrics Generation: Tempo can derive RED metrics (Rate, Errors, Duration) from incoming traces using the service graphs and span metrics processors. Generated metrics are stored in a Prometheus-compatible TSDB and can be scraped by Prometheus or Grafana Mimir.
5. Configure Overrides: Set per-tenant limits for maximum bytes per trace and maximum search bytes. These controls prevent individual tenants from consuming excessive resources in multi-tenant deployments.
Best Practices
- Use S3 or GCS as the storage backend in production for durability and scalability rather than local filesystem storage.
- Set block_retention to match your compliance and debugging requirements, typically 48h to 7d for active debugging or 30d for auditing.
- Enable the service_graphs processor to automatically generate RED metrics from traces without any instrumentation changes.
- Configure max_block_duration between 1h and 2h to balance between compaction efficiency and query latency.
- Use the metrics_generator to derive span-level metrics for visibility into trace-derived performance signals.
Common Mistakes
- Using local storage in production environments, which provides no durability guarantees and cannot scale horizontally.
- Setting block_retention to 0, which causes immediate data deletion after compaction and makes traces unqueryable.
- Forgetting to configure overrides.max_bytes_per_trace, which can lead to OOM kills in the ingester under high cardinality.
- Not exposing the metrics_generator registry to Prometheus, causing generated RED metrics to be silently discarded.
Security Recommendations
- Enable multi-tenancy with X-Scope-OrgID headers to isolate trace data between tenants in shared deployments.
- Use basic or OAuth2 authentication on gRPC and HTTP endpoints when exposing Tempo to untrusted networks.
- Configure TLS on the gRPC listener for encrypting trace data in transit between distributors and ingesters.
- Store S3 or GCS credentials in environment variables or Kubernetes secrets rather than hardcoding them in tempo.yaml.
- Restrict the distributor's ingestion endpoints to internal networks and use an API gateway for external access.
Production Tips
- Deploy Tempo with a microservices architecture using separate distributor, ingester, compactor, and querier deployments in Kubernetes.
- Use the metrics_generator storage path on fast local SSDs for WAL durability and high write throughput.
- Scale the compactor to a single instance per tenant to avoid race conditions during block compaction.
- Monitor Tempo's internal metrics via the Prometheus metrics endpoint on port 3200 at /metrics.
- Use Grafana's Tempo datasource with TraceQL for expressive trace queries and dashboard integration.