Files
mtusi2026lab7/infra/grafana/dashboards/messenger-observability.json
T
2026-12-03 19:25:38 +03:00

22 lines
1.9 KiB
JSON

{
"id": null,
"uid": "messenger-observability",
"title": "Messenger — Observability",
"tags": ["lab6", "opentelemetry"],
"timezone": "browser",
"schemaVersion": 39,
"version": 1,
"refresh": "5s",
"time": {"from": "now-1h", "to": "now"},
"panels": [
{"id": 1, "type": "timeseries", "title": "API requests / sec", "gridPos": {"h": 8, "w": 12, "x": 0, "y": 0}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "sum by (http_route, http_status_class) (rate(otel_messenger_http_requests_total[1m]))", "legendFormat": "{{http_route}} {{http_status_class}}", "refId": "A"}]},
{"id": 2, "type": "timeseries", "title": "API duration p95 (seconds)", "gridPos": {"h": 8, "w": 12, "x": 12, "y": 0}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "histogram_quantile(0.95, sum by (le) (rate(otel_messenger_http_request_duration_seconds_bucket[5m])))", "legendFormat": "p95", "refId": "A"}]},
{"id": 3, "type": "timeseries", "title": "Worker jobs / sec", "gridPos": {"h": 8, "w": 12, "x": 0, "y": 8}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "sum by (outcome) (rate(otel_messenger_jobs_processed_total[1m]))", "legendFormat": "{{outcome}}", "refId": "A"}]},
{"id": 4, "type": "timeseries", "title": "Worker job duration p95 (seconds)", "gridPos": {"h": 8, "w": 12, "x": 12, "y": 8}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "histogram_quantile(0.95, sum by (le) (rate(otel_messenger_job_processing_duration_seconds_bucket[5m])))", "legendFormat": "p95", "refId": "A"}]},
{"id": 5, "type": "logs", "title": "API + worker structured logs", "gridPos": {"h": 10, "w": 24, "x": 0, "y": 16}, "datasource": {"type": "loki", "uid": "loki"}, "targets": [{"expr": "{service_name=~\"messenger-api|messenger-worker\"}", "refId": "A"}]}
],
"annotations": {"list": []},
"templating": {"list": []},
"links": []
}