my-homelab-configs/apps/opentelemetry-lab/otel-lab-dashboard.json

92 lines
3.7 KiB
JSON

{
"annotations": {"list": []},
"description": "Explore the OpenTelemetry learning pipeline and its synthetic parent/child traces.",
"editable": false,
"id": null,
"uid": "otel-lab",
"title": "OpenTelemetry Trace Lab",
"tags": ["homelab", "opentelemetry", "tempo"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "1m",
"time": {"from": "now-6h", "to": "now"},
"templating": {
"list": [
{
"name": "traceId",
"label": "Selected trace",
"type": "textbox",
"query": "",
"current": {"text": "", "value": ""},
"hide": 0
}
]
},
"panels": [
{
"id": 1,
"type": "text",
"title": "Trace pipeline",
"gridPos": {"h": 4, "w": 24, "x": 0, "y": 0},
"options": {
"mode": "markdown",
"content": "Synthetic demo → OpenTelemetry Collector → Tempo → Grafana. The job emits a synthetic parent and child every five minutes. Select a row in the table to open its trace below. Tempo data is temporary and is lost when its pod is replaced."
}
},
{
"id": 2,
"type": "stat",
"title": "Collector ready replicas",
"gridPos": {"h": 4, "w": 8, "x": 0, "y": 4},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"targets": [{"refId": "A", "expr": "kube_deployment_status_replicas_available{namespace=\"monitoring\",deployment=\"otel-lab-collector\"}", "instant": true}],
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
},
{
"id": 3,
"type": "stat",
"title": "Tempo ready replicas",
"gridPos": {"h": 4, "w": 8, "x": 8, "y": 4},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"targets": [{"refId": "A", "expr": "kube_deployment_status_replicas_available{namespace=\"monitoring\",deployment=\"otel-lab-tempo\"}", "instant": true}],
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
},
{
"id": 4,
"type": "stat",
"title": "Demo job suspended",
"description": "Zero means the five-minute synthetic trace schedule is enabled.",
"gridPos": {"h": 4, "w": 8, "x": 16, "y": 4},
"datasource": {"type": "prometheus", "uid": "prometheus"},
"targets": [{"refId": "A", "expr": "kube_cronjob_spec_suspend{namespace=\"monitoring\",cronjob=\"otel-lab-demo\"}", "instant": true}],
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}}
},
{
"id": 5,
"type": "table",
"title": "Recent synthetic traces",
"description": "TraceQL finds the synthetic frontend spans. Select a result to load its complete trace in the panel below.",
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 8},
"datasource": {"type": "tempo", "uid": "tempo-lab"},
"targets": [{"refId": "A", "queryType": "traceql", "query": "{ resource.service.name = \"jeannie-demo-frontend\" }", "limit": 50, "tableType": "traces"}],
"fieldConfig": {
"defaults": {
"links": [{"title": "Show trace on this dashboard", "url": "/d/otel-lab/opentelemetry-trace-lab?var-traceId=${__data.fields.traceID}&${__url_time_range}", "targetBlank": false}]
},
"overrides": []
},
"options": {"showHeader": true}
},
{
"id": 6,
"type": "traces",
"title": "Selected trace timeline",
"description": "Choose a trace in the table. The parent and child represent synthetic services, not live application calls.",
"gridPos": {"h": 14, "w": 24, "x": 0, "y": 18},
"datasource": {"type": "tempo", "uid": "tempo-lab"},
"targets": [{"refId": "A", "queryType": "traceql", "query": "${traceId}"}]
}
]
}