$docker.recipes

Grafana Tempo

intermediate

High-scale distributed tracing backend with minimal dependencies.

[i]Overview

Grafana Tempo is a high-volume, minimal-dependency distributed tracing backend designed to handle massive scale trace ingestion and storage. Built by Grafana Labs, Tempo focuses on cost-effective trace storage by leveraging object storage backends and requiring only basic infrastructure. It accepts traces in multiple formats including OpenTelemetry, Jaeger, and Zipkin, making it compatible with existing instrumentation without vendor lock-in. This deployment provides a complete distributed tracing solution by combining Tempo's powerful trace backend with Grafana's visualization capabilities. The stack deploys two focused services: Tempo handles trace ingestion and storage with multiple protocol endpoints, while Grafana provides the user interface for querying and visualizing trace data through its built-in Tempo data source integration. Organizations seeking to implement distributed tracing at scale will find this combination particularly valuable because it eliminates the complexity and cost of traditional tracing backends like Jaeger with Elasticsearch. The pairing enables teams to correlate traces with metrics and logs in a unified interface, providing complete observability coverage for microservices architectures and distributed systems.

[*]Key Features

  • [+]Multi-protocol trace ingestion supporting OpenTelemetry OTLP (gRPC/HTTP), Jaeger, and Zipkin formats
  • [+]Object storage backend support for cost-effective long-term trace retention at massive scale
  • [+]TraceQL query language for advanced trace search and filtering capabilities
  • [+]Grafana integration with native Tempo data source for trace visualization and exploration
  • [+]Minimal infrastructure requirements with no external database dependencies
  • [+]Automatic trace sampling and retention policies to manage storage costs
  • [+]Service map generation from trace data to visualize microservice dependencies
  • [+]Correlation with logs and metrics through Grafana's unified observability interface

[#]Common Use Cases

  • [1]Microservices performance monitoring and latency analysis across distributed architectures
  • [2]Root cause analysis for complex distributed system failures and bottlenecks
  • [3]API response time optimization through detailed request flow tracing
  • [4]Service dependency mapping and architecture visualization in cloud-native environments
  • [5]Development team debugging of inter-service communication issues
  • [6]SRE incident response with trace-driven investigation workflows
  • [7]Cost-effective observability implementation for startups and growing engineering teams

[!]Prerequisites

  • [!]Docker and Docker Compose with at least 1GB available RAM for both services
  • [!]Understanding of distributed tracing concepts and OpenTelemetry instrumentation
  • [!]Application instrumentation already configured to export traces via OTLP, Jaeger, or Zipkin
  • [!]Tempo configuration file (tempo.yaml) prepared with storage and receiver settings
  • [!]Available ports 3000 (Grafana), 3200 (Tempo API), 4317 (OTLP gRPC), and 4318 (OTLP HTTP)
  • [!]Basic knowledge of Grafana dashboard creation and data source configuration
[!]

WARNING: For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

[$]docker-compose.yml

[docker-compose.yml]
1services:
2 tempo:
3 image: grafana/tempo:latest
4 container_name: tempo
5 restart: unless-stopped
6 command:
7 - -config.file=/etc/tempo/tempo.yaml
8 volumes:
9 - ./tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
10 - tempo_data:/tmp/tempo
11 ports:
12 - "3200:3200"
13 - "4317:4317"
14 - "4318:4318"
15 networks:
16 - tempo-network
17
18 grafana:
19 image: grafana/grafana:latest
20 container_name: grafana
21 restart: unless-stopped
22 environment:
23 GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
24 ports:
25 - "3000:3000"
26 depends_on:
27 - tempo
28 networks:
29 - tempo-network
30
31volumes:
32 tempo_data:
33
34networks:
35 tempo-network:
36 driver: bridge

[$].env Template

[.env]
1GRAFANA_PASSWORD=admin

[i]Usage Notes

  1. [1]Docs: https://grafana.com/docs/tempo/latest/
  2. [2]Grafana at http://localhost:3000 (admin/GRAFANA_PASSWORD)
  3. [3]Tempo API on port 3200, add as Tempo datasource in Grafana
  4. [4]OTLP gRPC on 4317, HTTP on 4318 for trace ingestion
  5. [5]Create tempo/tempo.yaml config before starting
  6. [6]Pairs with Loki (logs) and Mimir (metrics) for full observability

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

tempo
tempo:
  image: grafana/tempo:latest
  container_name: tempo
  restart: unless-stopped
  command:
    - "-config.file=/etc/tempo/tempo.yaml"
  volumes:
    - ./tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
    - tempo_data:/tmp/tempo
  ports:
    - "3200:3200"
    - "4317:4317"
    - "4318:4318"
  networks:
    - tempo-network
grafana
grafana:
  image: grafana/grafana:latest
  container_name: grafana
  restart: unless-stopped
  environment:
    GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
  ports:
    - "3000:3000"
  depends_on:
    - tempo
  networks:
    - tempo-network

[>]Quick Start

[terminal]
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 tempo:
5 image: grafana/tempo:latest
6 container_name: tempo
7 restart: unless-stopped
8 command:
9 - -config.file=/etc/tempo/tempo.yaml
10 volumes:
11 - ./tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
12 - tempo_data:/tmp/tempo
13 ports:
14 - "3200:3200"
15 - "4317:4317"
16 - "4318:4318"
17 networks:
18 - tempo-network
19
20 grafana:
21 image: grafana/grafana:latest
22 container_name: grafana
23 restart: unless-stopped
24 environment:
25 GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}
26 ports:
27 - "3000:3000"
28 depends_on:
29 - tempo
30 networks:
31 - tempo-network
32
33volumes:
34 tempo_data:
35
36networks:
37 tempo-network:
38 driver: bridge
39EOF
40
41# 2. Create the .env file
42cat > .env << 'EOF'
43GRAFANA_PASSWORD=admin
44EOF
45
46# 3. Start the services
47docker compose up -d
48
49# 4. View logs
50docker compose logs -f

[>]One-Liner

Run this command to download and set up the recipe in one step:

[terminal]
1curl -fsSL https://docker.recipes/api/recipes/grafana-tempo/run | bash

[?]Troubleshooting

  • [!]Tempo container fails to start: Verify tempo.yaml configuration file exists and has correct YAML syntax
  • [!]Traces not appearing in Grafana: Check Tempo data source configuration uses http://tempo:3200 as URL
  • [!]OTLP trace ingestion failing: Confirm applications are sending traces to correct ports 4317 (gRPC) or 4318 (HTTP)
  • [!]High memory usage in Tempo: Adjust ingestion rate limits and trace sampling configuration in tempo.yaml
  • [!]Grafana cannot connect to Tempo: Ensure both services are on the same Docker network and Tempo is healthy
  • [!]TraceQL queries returning no results: Verify trace retention period and check trace IDs are being indexed correctly

Community Notes

Loading...
Loading notes...

## Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license