Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.

Commit 7ed9656

Browse files
authored
Merge pull request #8305 from systeminit/fnichol/tempo-tracing
feat(tempo): replace Jaeger with Grafana Tempo for distributed tracing
2 parents cb7ca9b + eaf922e commit 7ed9656

File tree

15 files changed

+505
-26
lines changed

15 files changed

+505
-26
lines changed

DEV_DOCS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ These external services are deployed via [`docker compose`](https://docs.docker.
215215
Thus, it is worth checking if you are running these services to avoid conflicts when running SI.
216216
Potentially conflicting services include, but are not limited to, the following:
217217

218-
* Jaeger
218+
* Tempo
219219
* NATS and NATS Jetstream
220220
* OpenTelemetry
221221
* PostgreSQL

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ We use [`buck2`](https://github.com/facebook/buck2) to run the stack, run and bu
8787
8888
> [!WARNING]
8989
> Before continuing, you should stop any locally running services to avoid conflicting ports with the stack.
90-
> Some of the services that will run include, but are not limited to the following: PostgreSQL, NATS, Jaeger and OpenTelemetry._
90+
> Some of the services that will run include, but are not limited to the following: PostgreSQL, NATS, Tempo and OpenTelemetry._
9191
9292
Check if you are ready to run the stack before continuing.
9393

component/otelcol/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ ENV SI_OTEL_COL__HONEYCOMB_API_KEY=""
77

88
# We're going to base our image on a non-scratch image which should allow us to
99
# `docker exec` into a running instance for debugging
10+
1011
FROM alpine:3 AS final
12+
1113
RUN apk add --no-cache \
1214
curl
13-
WORKDIR /app
15+
1416
COPY --from=otelcol /otelcol-contrib /bin/otelcol
1517
COPY ./*config.yaml /etc/otelcol/
16-
COPY ./docker-entrypoint.sh /app/docker-entrypoint.sh
18+
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
1719

1820
HEALTHCHECK CMD curl --fail http://127.0.0.1:13133/ || exit 1
1921

20-
ENTRYPOINT ["/app/docker-entrypoint.sh"]
22+
ENTRYPOINT ["/docker-entrypoint.sh"]

component/otelcol/config.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
receivers:
23
otlp:
34
protocols:
@@ -203,10 +204,12 @@ processors:
203204
exporters:
204205
debug:
205206
verbosity: normal
206-
otlp:
207-
endpoint: jaeger:4317
207+
otlp/tempo:
208+
endpoint: tempo:4317
208209
tls:
209210
insecure: true
211+
otlphttp/loki:
212+
endpoint: http://loki:3100/otlp
210213
prometheus:
211214
endpoint: otelcol:9090
212215

@@ -219,15 +222,15 @@ service:
219222
logs:
220223
receivers: [otlp]
221224
processors: [batch]
222-
exporters: [debug, otlp]
225+
exporters: [debug, otlphttp/loki]
223226
traces:
224227
receivers: [otlp]
225228
processors:
226229
- memory_limiter
227230
- transform/spanevent
228231
- filter/spanevent
229232
- batch
230-
exporters: [debug, otlp]
233+
exporters: [debug, otlp/tempo]
231234
metrics:
232235
receivers: [otlp]
233236
processors: [batch]
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1-
#!/bin/sh
1+
#!/usr/bin/env sh
2+
set -eu
23

3-
sed -i "s/SI_OTEL_COL__HONEYCOMB_API_KEY/$SI_OTEL_COL__HONEYCOMB_API_KEY/g" ${SI_OTEL_COL__CONFIG_PATH-/etc/otelcol/config.yaml}
4+
config="${SI_OTEL_COL__CONFIG_PATH-/etc/otelcol/config.yaml}"
45

5-
/bin/otelcol --config ${SI_OTEL_COL__CONFIG_PATH-/etc/otelcol/config.yaml}
6+
sed \
7+
-i "s/SI_OTEL_COL__HONEYCOMB_API_KEY/${SI_OTEL_COL__HONEYCOMB_API_KEY:-}/g" \
8+
"$config"
9+
10+
exec /bin/otelcol --config "$config"

component/otelcol/honeycomb-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
receivers:
23
otlp:
34
protocols:

component/tempo/BUCK

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
load(
2+
"@prelude-si//:macros.bzl",
3+
"container_image",
4+
)
5+
6+
container_image(
7+
name = "tempo",
8+
srcs = {
9+
"tempo.yaml": ".",
10+
},
11+
build_args = {
12+
"BASE_VERSION": "2.9.0",
13+
},
14+
run_docker_args = [
15+
"--publish",
16+
"3200:3200",
17+
],
18+
default_target = True,
19+
)

component/tempo/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
ARG BASE_VERSION
2+
FROM grafana/tempo:${BASE_VERSION}
3+
COPY ./tempo.yaml /etc/tempo.yaml

component/tempo/tempo.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
server:
2+
http_listen_port: 3200
3+
4+
distributor:
5+
receivers:
6+
otlp:
7+
protocols:
8+
grpc:
9+
endpoint: 0.0.0.0:4317
10+
http:
11+
endpoint: 0.0.0.0:4318
12+
13+
ingester:
14+
max_block_duration: 5m
15+
16+
compactor:
17+
compaction:
18+
block_retention: 336h
19+
20+
storage:
21+
trace:
22+
backend: local
23+
wal:
24+
path: /tmp/tempo/wal
25+
local:
26+
path: /tmp/tempo/blocks
27+
28+
query_frontend:
29+
search:
30+
duration_slo: 5s
31+
throughput_bytes_slo: 1.073741824e+09
32+
trace_by_id:
33+
duration_slo: 5s
34+
35+
metrics_generator:
36+
registry:
37+
external_labels:
38+
source: tempo
39+
cluster: dev
40+
storage:
41+
path: /tmp/tempo/generator/wal
42+
traces_storage:
43+
path: /tmp/tempo/generator/traces
44+
processor:
45+
service_graphs:
46+
dimensions: []
47+
span_metrics:
48+
dimensions: []

dev/Tiltfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ groups = {
4040
],
4141
"telemetry": [
4242
"grafana",
43-
"jaeger",
43+
"tempo",
4444
"loki",
4545
"node_exporter",
4646
"prometheus",
@@ -165,11 +165,6 @@ compose_services = {
165165
link("http://localhost:3000", "grafana-ui"),
166166
],
167167
},
168-
"jaeger": {
169-
"links": [
170-
link("http://localhost:16686", "jaeger-ui"),
171-
],
172-
},
173168
"localstack": {
174169
"links": [
175170
link("http://localhost:4566", "localstack-api"),
@@ -184,6 +179,11 @@ compose_services = {
184179
"prometheus": {},
185180
"promtail": {},
186181
"spicedb": {},
182+
"tempo": {
183+
"links": [
184+
link("http://localhost:3200", "tempo-ui"),
185+
],
186+
},
187187
"versitygw": {},
188188
}
189189
for service, kwargs in compose_services.items():

0 commit comments

Comments
 (0)