Skip to main content

05 – Setup Tempo Quickstart (Docker Compose)

Learning Objectives

  • Stand up Tempo, Grafana, and the OTel Collector using Docker Compose.
  • Optionally add Loki and Prometheus for full-stack correlation.
  • Configure Grafana to query Tempo.

Docker Compose (dev lab)

Create docker-compose.tempo.yml:

version: '3.9'
services:
tempo:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo/tempo.yaml"]
ports: ["3200:3200"]
volumes:
- ./tempo/tempo.yaml:/etc/tempo/tempo.yaml:ro
- ./data/tempo:/tmp/tempo

collector:
image: otel/opentelemetry-collector:latest
command: ["--config=/etc/otelcol/config.yaml"]
ports: ["4317:4317", "4318:4318"]
volumes:
- ./collector/config.yaml:/etc/otelcol/config.yaml:ro
depends_on: [tempo]

grafana:
image: grafana/grafana:latest
ports: ["3000:3000"]
environment:
- GF_SECURITY_ADMIN_USER=admin
- GF_SECURITY_ADMIN_PASSWORD=admin
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning
depends_on: [tempo]

# Optional extras
loki:
image: grafana/loki:2.9.0
command: ["-config.file=/etc/loki/local-config.yaml"]
ports: ["3100:3100"]
volumes:
- ./loki/local-config.yaml:/etc/loki/local-config.yaml:ro

prometheus:
image: prom/prometheus:latest
command: ["--config.file=/etc/prometheus/prometheus.yml"]
ports: ["9090:9090"]
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro

Visual: Compose Stack

Supporting Files

  • tempo/tempo.yaml: from Section 4 (filesystem backend).
  • collector/config.yaml: from Section 3 (OTLP → Tempo exporter).
  • grafana/provisioning/datasources/tempo.yaml:
apiVersion: 1
datasources:
- name: Tempo
type: tempo
access: proxy
url: http://tempo:3200
isDefault: true

Hands-on Lab

  1. Create the folder structure and files as shown.
  2. docker compose -f docker-compose.tempo.yml up -d
  3. Open Grafana on http://localhost:3000, login admin/admin, verify Tempo data source.

Deliverables

  • A running dev stack with Grafana + Tempo + Collector.

Quiz (Self-check)

  • Which ports expose OTLP? Which port exposes Tempo HTTP API?
  • What does Grafana need to talk to Tempo?

Resources

  • Grafana Provisioning Docs
  • Tempo + Grafana quickstart guides