feat(grafana): swap Jaeger→Tempo, enable trace↔log correlation
This commit is contained in:
@@ -712,7 +712,7 @@ services:
|
|||||||
- ./assets/icons/apple-touch-icon.png:/usr/share/grafana/public/img/apple-touch-icon.png:ro
|
- ./assets/icons/apple-touch-icon.png:/usr/share/grafana/public/img/apple-touch-icon.png:ro
|
||||||
depends_on:
|
depends_on:
|
||||||
- loki
|
- loki
|
||||||
- jaeger
|
- tempo
|
||||||
- prometheus
|
- prometheus
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
|
|||||||
@@ -1,15 +1,30 @@
|
|||||||
apiVersion: 1
|
apiVersion: 1
|
||||||
datasources:
|
datasources:
|
||||||
- name: Prometheus
|
|
||||||
type: prometheus
|
|
||||||
access: proxy
|
|
||||||
url: http://prometheus:9090
|
|
||||||
isDefault: true
|
|
||||||
- name: Loki
|
- name: Loki
|
||||||
type: loki
|
type: loki
|
||||||
access: proxy
|
access: proxy
|
||||||
url: http://loki:3100
|
url: http://loki:3100
|
||||||
- name: Jaeger
|
uid: loki
|
||||||
type: jaeger
|
isDefault: true
|
||||||
|
jsonData:
|
||||||
|
maxLines: 1000
|
||||||
|
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
access: proxy
|
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
|
||||||
|
|||||||
@@ -150,3 +150,15 @@ class TestPrometheusTargets:
|
|||||||
assert "cadvisor" in jobs
|
assert "cadvisor" in jobs
|
||||||
assert "nvidia-gpu" in jobs
|
assert "nvidia-gpu" in jobs
|
||||||
assert "jaeger" not 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"
|
||||||
|
|||||||
Reference in New Issue
Block a user