Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 34 additions & 8 deletions examples/otel-collector/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,44 @@ services:
- otel-network
user: "0:0" # Run as root to ensure write permissions

# jaeger:
# image: jaegertracing/all-in-one:latest
# ports:
# - "16686:16686" # Jaeger UI
# - "9411:9411" # Zipkin compatible endpoint
# networks:
# - otel-network
tempo:
image: grafana/tempo:latest
command: ["-config.file=/etc/tempo.yaml"]
volumes:
- ./tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/tmp/tempo
ports:
- "3200:3200"
networks:
- otel-network
user: "0:0"

prometheus:
image: prom/prometheus:latest
command: ["--config.file=/etc/prometheus.yaml"]
volumes:
- ./prometheus.yaml:/etc/prometheus.yaml
- prometheus-data:/prometheus
ports:
- "9093:9093"
networks:
- otel-network

grafana:
image: grafana/grafana:latest
volumes:
- grafana-data:/var/lib/grafana
ports:
- "3003:3003"
networks:
- otel-network

networks:
otel-network:
driver: bridge

volumes:
otel-collector-logs:
# Using a named volume with proper permissions
tempo-data: {}
prometheus-data: {}
grafana-data: {}
6 changes: 5 additions & 1 deletion examples/otel-collector/otel-collector-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ receivers:
endpoint: "0.0.0.0:4318"

exporters:
otlp:
endpoint: "tempo:4317"
tls:
insecure: true
debug: {} # For debugging telemetry data in the console

# prometheus:
Expand Down Expand Up @@ -34,7 +38,7 @@ service:

traces:
receivers: [otlp]
exporters: [file/traces] # Zipkin exporter will send to Jaeger
exporters: [file/traces, otlp] # Zipkin exporter will send to Jaeger
telemetry:
logs:
level: debug
Expand Down
10 changes: 10 additions & 0 deletions examples/otel-collector/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
global:
scrape_interval: 15s

scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9093']
- job_name: 'tempo'
static_configs:
- targets: ['tempo:3200']
1 change: 1 addition & 0 deletions examples/otel-collector/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fastapi
uvicorn
openai

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"UID":"c507d1c2-ad39-474f-a9f8-a2f18aec8368","created_at":"2025-08-04T08:37:14.043056694Z","version":{"version":"v2.8.1","revision":"9874d459b","branch":"main","buildUser":"","buildDate":"","goVersion":"go1.24.5"}}
43 changes: 43 additions & 0 deletions examples/otel-collector/tempo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
server:
http_listen_port: 3200

distributor:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318

ingester:
trace_idle_period: 10s
max_block_bytes: 1000000
max_block_duration: 5m

compactor:
compaction:
compaction_window: 1h
max_block_bytes: 100000000
block_retention: 1h
compacted_block_retention: 10m

storage:
trace:
backend: local
local:
path: /tmp/tempo/blocks

# metrics_generator_enabled: true

metrics_generator:
registry:
external_labels:
source: tempo
storage:
path: /tmp/tempo/generator/wal
remote_write:
- url: http://prometheus:9093/api/v1/write
send_exemplars: true

overrides: {}