feat(grafana): swap Jaeger→Tempo, enable trace↔log correlation

This commit is contained in:
kert
2026-05-01 11:05:30 -04:00
parent 41d834de8b
commit a011917f58
3 changed files with 36 additions and 9 deletions

View File

@@ -712,7 +712,7 @@ services:
- ./assets/icons/apple-touch-icon.png:/usr/share/grafana/public/img/apple-touch-icon.png:ro
depends_on:
- loki
- jaeger
- tempo
- prometheus
healthcheck:
test:

View File

@@ -1,15 +1,30 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
- name: Loki
type: loki
access: proxy
url: http://loki:3100
- name: Jaeger
type: jaeger
uid: loki
isDefault: true
jsonData:
maxLines: 1000
- name: Prometheus
type: prometheus
access: proxy
url: http://jaeger:16686
url: http://prometheus:9090
uid: prometheus
jsonData:
httpMethod: POST
- name: Tempo
type: tempo
access: proxy
url: http://tempo:3200
uid: tempo
jsonData:
tracesToLogsV2:
datasourceUid: loki
filterByTraceID: true
serviceMap:
datasourceUid: prometheus

View File

@@ -150,3 +150,15 @@ class TestPrometheusTargets:
assert "cadvisor" in jobs
assert "nvidia-gpu" in jobs
assert "jaeger" not in jobs
class TestGrafanaDatasources:
def test_datasources_have_tempo_loki_default_correlation(self):
path = ROOT / "infra/grafana/provisioning/datasources/datasources.yml"
cfg = yaml.safe_load(path.read_text())
ds = {d["name"]: d for d in cfg["datasources"]}
assert "Tempo" in ds and "Jaeger" not in ds
assert ds["Loki"].get("isDefault") is True
tempo = ds["Tempo"]
assert tempo["jsonData"]["tracesToLogsV2"]["datasourceUid"] == "loki"
assert tempo["jsonData"]["serviceMap"]["datasourceUid"] == "prometheus"