{ "uid": "messenger-lab6", "title": "Messenger lab6 — API, worker, traces", "tags": ["messenger", "lab6"], "timezone": "utc", "schemaVersion": 39, "version": 1, "refresh": "5s", "time": {"from": "now-15m", "to": "now"}, "panels": [ { "id": 1, "type": "stat", "title": "API RPS", "gridPos": {"h": 6, "w": 6, "x": 0, "y": 0}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "sum(rate(http_server_requests_total[1m]))", "refId": "A"}], "fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []} }, { "id": 2, "type": "timeseries", "title": "HTTP 5xx ratio (business routes)", "gridPos": {"h": 6, "w": 9, "x": 6, "y": 0}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "sum(rate(http_server_requests_total{http_response_status_class=\"5xx\"}[1m])) / clamp_min(sum(rate(http_server_requests_total[1m])), 0.001)", "refId": "A"}], "fieldConfig": {"defaults": {"unit": "percentunit"}, "overrides": []} }, { "id": 3, "type": "timeseries", "title": "HTTP p95 duration (histogram)", "gridPos": {"h": 6, "w": 9, "x": 15, "y": 0}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_duration_bucket[1m])))", "refId": "A"}], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []} }, { "id": 4, "type": "timeseries", "title": "Worker jobs by outcome", "gridPos": {"h": 7, "w": 10, "x": 0, "y": 6}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "sum by (job_outcome) (rate(messenger_jobs_total[1m]))", "refId": "A"}], "fieldConfig": {"defaults": {"unit": "ops"}, "overrides": []} }, { "id": 5, "type": "timeseries", "title": "Worker job p95 duration", "gridPos": {"h": 7, "w": 8, "x": 10, "y": 6}, "datasource": {"type": "prometheus", "uid": "prometheus"}, "targets": [{"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_bucket[1m])))", "refId": "A"}], "fieldConfig": {"defaults": {"unit": "s"}, "overrides": []} }, { "id": 6, "type": "logs", "title": "API + worker structured logs", "gridPos": {"h": 9, "w": 24, "x": 0, "y": 13}, "datasource": {"type": "loki", "uid": "loki"}, "targets": [{"expr": "{job=~\"messenger-(api|worker)\"}", "refId": "A"}] } ] }