Tempo
Grafana's distributed tracing backend
Grafana's distributed tracing backend
Grafana Tempo is a large-scale distributed tracing backend released by Grafana Labs in 2020. Its operating costs are far lower than those of existing tools like Jaeger and Zipkin, and it integrates seamlessly with the Grafana ecosystem.
Tempo's key feature is that it stores trace data directly in object storage without indexing. Because it needs no indexing database such as Cassandra or Elasticsearch, operating costs are cut by more than 80%. It uses inexpensive object storage such as S3, GCS, and Azure Blob.
Tempo supports all major trace protocols, including OpenTelemetry, Jaeger, Zipkin, and OpenCensus. You can look up a trace directly by trace ID, or click a trace ID in a Loki log in Grafana to visualize that trace right away. This is called Exemplars.
In practice, it is combined with Grafana, Loki, and Prometheus to form an observability stack. You can trace problems by moving naturally from logs to traces and from traces to metrics, greatly reducing debugging time in microservice environments.
# Helm으로 Grafana Tempo 설치
# values.yaml
tempo:
storage:
trace:
backend: s3
s3:
bucket: tempo-traces
endpoint: s3.amazonaws.com
region: ap-northeast-2
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
jaeger:
protocols:
thrift_http:
endpoint: 0.0.0.0:14268
grpc:
endpoint: 0.0.0.0:14250
zipkin:
endpoint: 0.0.0.0:9411
# 설치 명령
# helm repo add grafana https://grafana.github.io/helm-charts
# helm install tempo grafana/tempo -f values.yaml
---
# OpenTelemetry Collector 설정 (Tempo로 trace 전송)
apiVersion: v1
kind: ConfigMap
metadata:
name: otel-collector-config
data:
config.yaml: |
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch:
timeout: 1s
send_batch_size: 1000
exporters:
otlp:
endpoint: tempo.monitoring.svc.cluster.local:4317
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp]
---
# Grafana에서 Tempo 데이터소스 설정
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-datasources
data:
tempo.yaml: |
apiVersion: 1
datasources:
- name: Tempo
type: tempo
url: http://tempo.monitoring.svc.cluster.local:3100
jsonData:
tracesToLogs:
datasourceUid: loki
tags: ['service.name']
mappedTags: [{ key: 'service.name', value: 'app' }]
mapTagNamesEnabled: true
spanStartTimeShift: '-1h'
spanEndTimeShift: '1h'
tracesToMetrics:
datasourceUid: prometheus
tags: [{ key: 'service.name', value: 'service' }]
Senior: "Our Jaeger Elasticsearch cluster costs over 5 million KRW a month. If we switch to Tempo, we only pay for S3, so that's a saving of more than 90%."
Junior: "Without indexing, isn't trace search slow?"
Senior: "You can look up by trace ID directly, or click the trace ID in a Loki log and it shows up right away. The Grafana integration is the key."
Interviewer: "Please describe your experience operating a distributed tracing system."
Candidate: "I used Grafana Tempo to process more than 100 million spans per day. Storing in S3 cut operating costs by 85% compared with Jaeger, and because I could click a trace ID in Loki logs to see the trace immediately, incident analysis time dropped from an average of 30 minutes to 5 minutes."
Take a mock interview on this topic → WIA SOOM AI Interview · Start for free
Reviewer: "This API calls an external service. Did you set up trace propagation?"
Developer: "Yes, I set it up so the traceparent header is propagated automatically with the OpenTelemetry SDK. You can see the entire call chain in Tempo."