{ "uid": "messenger", "title": "Messenger observability", "schemaVersion": 41, "version": 1, "refresh": "5s", "time": { "from": "now-15m", "to": "now" }, "panels": [ { "id": 1, "title": "API requests / second", "type": "timeseries", "datasource": { "uid": "prometheus", "type": "prometheus" }, "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "targets": [ { "expr": "sum by (service_instance_id) (rate(http_requests_total{route!~\"/health/.*\"}[1m]))", "refId": "A", "legendFormat": "{{outcome}} {{service_instance_id}}" } ], "fieldConfig": { "defaults": { "unit": "reqps" } } }, { "id": 2, "title": "API 5xx / second", "type": "timeseries", "datasource": { "uid": "prometheus", "type": "prometheus" }, "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, "targets": [ { "expr": "sum(rate(http_requests_total{status_class=\"5xx\",route!~\"/health/.*\"}[1m]))", "refId": "A", "legendFormat": "{{outcome}} {{service_instance_id}}" } ], "fieldConfig": { "defaults": { "unit": "reqps" } } }, { "id": 3, "title": "API p95 duration", "type": "timeseries", "datasource": { "uid": "prometheus", "type": "prometheus" }, "gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 }, "targets": [ { "expr": "histogram_quantile(0.95, sum by (le) (rate(http_duration_seconds_bucket{route!~\"/health/.*\"}[1m])))", "refId": "A", "legendFormat": "{{outcome}} {{service_instance_id}}" } ], "fieldConfig": { "defaults": { "unit": "s" } } }, { "id": 4, "title": "Worker jobs / second", "type": "timeseries", "datasource": { "uid": "prometheus", "type": "prometheus" }, "gridPos": { "x": 12, "y": 8, "w": 12, "h": 8 }, "targets": [ { "expr": "sum by (outcome) (rate(worker_jobs_total[1m]))", "refId": "A", "legendFormat": "{{outcome}} {{service_instance_id}}" } ], "fieldConfig": { "defaults": { "unit": "ops" } } }, { "id": 5, "title": "Worker p95 duration", "type": "timeseries", "datasource": { "uid": "prometheus", "type": "prometheus" }, "gridPos": { "x": 0, "y": 16, "w": 12, "h": 8 }, "targets": [ { "expr": "histogram_quantile(0.95, sum by (le,outcome) (rate(worker_job_duration_seconds_bucket[1m])))", "refId": "A", "legendFormat": "{{outcome}} {{service_instance_id}}" } ], "fieldConfig": { "defaults": { "unit": "s" } } }, { "id": 6, "title": "API and worker structured logs", "type": "logs", "datasource": { "uid": "loki", "type": "loki" }, "gridPos": { "x": 12, "y": 16, "w": 12, "h": 8 }, "targets": [ { "expr": "{service_name=~\"messenger-api|messenger-worker\"}", "refId": "A" } ] } ] }