HAProxy /metrics scraped by the Collector, recording rules and seven alerts with promtool tests and runbooks (make alerts_test, CI step), byte-sized Collector export queues with 30 s retries, SDK internal metrics, SLO/LB/pipeline dashboard rows, driver commands alerts-check and backend-outage (change slo-alerts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
897 lines
42 KiB
JSON
897 lines
42 KiB
JSON
{
|
||
"uid": "messenger-overview",
|
||
"title": "Messenger overview",
|
||
"description": "Signals of contracts/observability.md, levels 3 and 4: SLI, SLO and error budget, alert windows and alert states, API RPS, errors and duration, worker jobs and duration, queue depth and age, time to ready, PostgreSQL pools, worker and container saturation, load balancer responses and ready replicas, telemetry pipeline queues and losses, logs and traces (design changes otel-telemetry, decision 16, job-trace-propagation, decision 14, and slo-alerts, decision 10). Provisioned from git, UI changes are not saved.",
|
||
"tags": ["messenger", "lab6"],
|
||
"timezone": "utc",
|
||
"editable": false,
|
||
"graphTooltip": 1,
|
||
"schemaVersion": 39,
|
||
"version": 3,
|
||
"refresh": "30s",
|
||
"time": {"from": "now-1h", "to": "now"},
|
||
"annotations": {"list": []},
|
||
"templating": {"list": []},
|
||
"links": [],
|
||
"panels": [
|
||
{
|
||
"id": 25,
|
||
"type": "row",
|
||
"title": "SLO and alerts",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 26,
|
||
"type": "stat",
|
||
"title": "SLI over 7 days",
|
||
"description": "Sums of 5-minute increments of the recording rules (group messenger-slo) over the SLO window of 7 days. Availability: responses of the public LB frontend without 5xx (SLO 99.5 %); latency: light API requests without 5xx not longer than 0.25 s (SLO 99 %); time to ready: attachments ready without replay within 30 s (SLO 99 %).",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 6, "w": 8, "x": 0, "y": 1},
|
||
"fieldConfig": {
|
||
"defaults": {"unit": "percentunit", "decimals": 3, "min": 0, "max": 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 0.99}]}},
|
||
"overrides": [
|
||
{"matcher": {"id": "byFrameRefID", "options": "A"}, "properties": [{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 0.995}]}}]}
|
||
]
|
||
},
|
||
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "orientation": "vertical", "textMode": "value_and_name", "colorMode": "value", "graphMode": "none", "justifyMode": "auto"},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "1 - sum_over_time(messenger:slo_availability_bad:increase5m[7d]) / sum_over_time(messenger:slo_availability_total:increase5m[7d])",
|
||
"legendFormat": "availability (SLO 99.5 %)",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum_over_time(messenger:slo_latency_good:increase5m[7d]) / sum_over_time(messenger:slo_latency_total:increase5m[7d])",
|
||
"legendFormat": "latency ≤ 0.25 s (SLO 99 %)",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum_over_time(messenger:slo_time_to_ready_good:increase5m[7d]) / sum_over_time(messenger:slo_time_to_ready_total:increase5m[7d])",
|
||
"legendFormat": "time to ready ≤ 30 s (SLO 99 %)",
|
||
"instant": true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 27,
|
||
"type": "stat",
|
||
"title": "Error budget left over 7 days",
|
||
"description": "(SLI − SLO) / (1 − SLO) over 7 days: 100 % — no bad events, 0 — the budget is spent, below zero — the SLO is violated.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 6, "w": 8, "x": 8, "y": 1},
|
||
"fieldConfig": {
|
||
"defaults": {"unit": "percentunit", "decimals": 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "orange", "value": 0}, {"color": "green", "value": 0.25}]}},
|
||
"overrides": []
|
||
},
|
||
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "orientation": "vertical", "textMode": "value_and_name", "colorMode": "value", "graphMode": "none", "justifyMode": "auto"},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "((1 - sum_over_time(messenger:slo_availability_bad:increase5m[7d]) / sum_over_time(messenger:slo_availability_total:increase5m[7d])) - 0.995) / (1 - 0.995)",
|
||
"legendFormat": "availability",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "(sum_over_time(messenger:slo_latency_good:increase5m[7d]) / sum_over_time(messenger:slo_latency_total:increase5m[7d]) - 0.99) / (1 - 0.99)",
|
||
"legendFormat": "latency",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "(sum_over_time(messenger:slo_time_to_ready_good:increase5m[7d]) / sum_over_time(messenger:slo_time_to_ready_total:increase5m[7d]) - 0.99) / (1 - 0.99)",
|
||
"legendFormat": "time to ready",
|
||
"instant": true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 28,
|
||
"type": "stat",
|
||
"title": "SLI over the dashboard range",
|
||
"description": "The same SLI over the selected time range: how much an incident or a drill spent.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 6, "w": 8, "x": 16, "y": 1},
|
||
"fieldConfig": {
|
||
"defaults": {"unit": "percentunit", "decimals": 3, "min": 0, "max": 1, "color": {"mode": "thresholds"}, "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 0.99}]}},
|
||
"overrides": [
|
||
{"matcher": {"id": "byFrameRefID", "options": "A"}, "properties": [{"id": "thresholds", "value": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 0.995}]}}]}
|
||
]
|
||
},
|
||
"options": {"reduceOptions": {"calcs": ["lastNotNull"], "fields": "", "values": false}, "orientation": "vertical", "textMode": "value_and_name", "colorMode": "value", "graphMode": "none", "justifyMode": "auto"},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "1 - sum_over_time(messenger:slo_availability_bad:increase5m[$__range]) / sum_over_time(messenger:slo_availability_total:increase5m[$__range])",
|
||
"legendFormat": "availability",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum_over_time(messenger:slo_latency_good:increase5m[$__range]) / sum_over_time(messenger:slo_latency_total:increase5m[$__range])",
|
||
"legendFormat": "latency",
|
||
"instant": true
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum_over_time(messenger:slo_time_to_ready_good:increase5m[$__range]) / sum_over_time(messenger:slo_time_to_ready_total:increase5m[$__range])",
|
||
"legendFormat": "time to ready",
|
||
"instant": true
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 29,
|
||
"type": "timeseries",
|
||
"title": "Alert windows: 5xx share on LB and slow light requests (2 min)",
|
||
"description": "Recording rules of MessengerHighErrorRate (threshold 5 %) and MessengerSlowRequests (threshold 10 %); both also need more than 0.1 request per second.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 7},
|
||
"fieldConfig": {
|
||
"defaults": {"unit": "percentunit", "min": 0},
|
||
"overrides": [
|
||
{"matcher": {"id": "byFrameRefID", "options": "C"}, "properties": [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"mode": "fixed", "fixedColor": "red"}}]},
|
||
{"matcher": {"id": "byFrameRefID", "options": "D"}, "properties": [{"id": "custom.lineStyle", "value": {"fill": "dash", "dash": [10, 10]}}, {"id": "color", "value": {"mode": "fixed", "fixedColor": "orange"}}]}
|
||
]
|
||
},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "messenger:lb_http_errors:ratio_rate2m",
|
||
"legendFormat": "5xx on LB"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "messenger:http_light_slow:ratio_rate2m",
|
||
"legendFormat": "slow light requests"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "vector(0.05)",
|
||
"legendFormat": "5xx threshold"
|
||
},
|
||
{
|
||
"refId": "D",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "vector(0.1)",
|
||
"legendFormat": "slow threshold"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 30,
|
||
"type": "state-timeline",
|
||
"title": "Alert states (1 — pending, 2 — firing)",
|
||
"description": "History of the series ALERTS over the retention of Prometheus (7 days): intervals of pending and firing by alert; 0 — no active alerts.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 7},
|
||
"fieldConfig": {
|
||
"defaults": {
|
||
"color": {"mode": "thresholds"},
|
||
"thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}, {"color": "yellow", "value": 1}, {"color": "red", "value": 2}]},
|
||
"mappings": [{"type": "value", "options": {"0": {"text": "none"}, "1": {"text": "pending"}, "2": {"text": "firing"}}}]
|
||
},
|
||
"overrides": []
|
||
},
|
||
"options": {"showValue": "never", "mergeValues": true, "rowHeight": 0.8, "legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (alertname) (ALERTS{alertstate=\"firing\"}) * 2 or max by (alertname) (ALERTS{alertstate=\"pending\"}) or on() vector(0)",
|
||
"legendFormat": "{{alertname}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 31,
|
||
"type": "table",
|
||
"title": "Slow light requests (traces longer than 0.25 s)",
|
||
"description": "TraceQL: server spans of light API routes longer than the latency SLI threshold; compare the server span with its PostgreSQL spans (slow database) or CPU of replicas (slow handler).",
|
||
"datasource": {"type": "tempo", "uid": "tempo"},
|
||
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 15},
|
||
"options": {"showHeader": true},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "tempo", "uid": "tempo"},
|
||
"queryType": "traceql",
|
||
"query": "{ kind = server && resource.service.name = \"messenger-api\" && duration > 250ms && span.http.response.status_code < 500 && span.http.route !~ \"/api/v1/users|/api/v1/auth/sessions|/api/v1/chats/.+/attachments|/api/v1/attachments/.+/content\" }",
|
||
"limit": 20,
|
||
"tableType": "traces"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 1,
|
||
"type": "row",
|
||
"title": "API (messenger-api)",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 23},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 2,
|
||
"type": "timeseries",
|
||
"title": "Requests per second by route and status class",
|
||
"description": "Count of the http.server.request.duration histogram, all replicas; health is not recorded.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 24},
|
||
"fieldConfig": {"defaults": {"unit": "reqps"}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "table", "placement": "right", "calcs": ["lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (http_route, status_class) (label_replace(rate(http_server_request_duration_seconds_count{job=\"messenger-api\"}[5m]), \"status_class\", \"${1}xx\", \"http_response_status_code\", \"([0-9])..\"))",
|
||
"legendFormat": "{{http_route}} {{status_class}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 3,
|
||
"type": "timeseries",
|
||
"title": "Error ratio (5xx of all requests)",
|
||
"description": "Numerator: API responses 5xx; denominator: all recorded requests. 4xx are shown separately; responses generated by the load balancer are not in API metrics.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 24},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\",http_response_status_code=~\"5..\"}[5m])) / sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\"}[5m]))",
|
||
"legendFormat": "5xx ratio"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 4,
|
||
"type": "timeseries",
|
||
"title": "Client errors ratio (4xx of all requests)",
|
||
"description": "Wrong password, foreign chat, validation: not part of the error ratio.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 24},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\",http_response_status_code=~\"4..\"}[5m])) / sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\"}[5m]))",
|
||
"legendFormat": "4xx ratio"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 5,
|
||
"type": "timeseries",
|
||
"title": "Request duration p50, p95 and p99 (all replicas)",
|
||
"description": "Quantiles from the sum of buckets of all replicas, not averages of replicas.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 32},
|
||
"fieldConfig": {"defaults": {"unit": "s", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.5, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\"}[5m])))",
|
||
"legendFormat": "p50"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\"}[5m])))",
|
||
"legendFormat": "p95"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\"}[5m])))",
|
||
"legendFormat": "p99"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 6,
|
||
"type": "timeseries",
|
||
"title": "Request duration p95 by route",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 32},
|
||
"fieldConfig": {"defaults": {"unit": "s", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "table", "placement": "right", "calcs": ["lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.95, sum by (le, http_route) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\"}[5m])))",
|
||
"legendFormat": "{{http_route}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 7,
|
||
"type": "row",
|
||
"title": "Worker (messenger-worker)",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 40},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 8,
|
||
"type": "timeseries",
|
||
"title": "Jobs per second by outcome",
|
||
"description": "Count of messenger.job.duration by messenger.job.outcome. Successful: ready; failed: failed, retry, requeued, dropped, error; skipped is neither.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 41},
|
||
"fieldConfig": {"defaults": {"unit": "ops"}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (messenger_job_outcome) (rate(messenger_job_duration_seconds_count{job=\"messenger-worker\"}[5m]))",
|
||
"legendFormat": "{{messenger_job_outcome}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 9,
|
||
"type": "timeseries",
|
||
"title": "Successful and failed jobs per second",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 41},
|
||
"fieldConfig": {"defaults": {"unit": "ops", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(messenger_job_duration_seconds_count{job=\"messenger-worker\",messenger_job_outcome=\"ready\"}[5m]))",
|
||
"legendFormat": "successful (ready)"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(messenger_job_duration_seconds_count{job=\"messenger-worker\",messenger_job_outcome=~\"failed|retry|requeued|dropped|error\"}[5m]))",
|
||
"legendFormat": "failed"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 10,
|
||
"type": "timeseries",
|
||
"title": "Job duration p50, p95 and p99 (ready)",
|
||
"description": "Handling of one delivery after the concurrency slot, outcome ready; quantiles from the sum of buckets of all workers.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 41},
|
||
"fieldConfig": {"defaults": {"unit": "s", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.5, sum by (le) (rate(messenger_job_duration_seconds_bucket{job=\"messenger-worker\",messenger_job_outcome=\"ready\"}[5m])))",
|
||
"legendFormat": "p50"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket{job=\"messenger-worker\",messenger_job_outcome=\"ready\"}[5m])))",
|
||
"legendFormat": "p95"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_job_duration_seconds_bucket{job=\"messenger-worker\",messenger_job_outcome=\"ready\"}[5m])))",
|
||
"legendFormat": "p99"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 14,
|
||
"type": "row",
|
||
"title": "Pipeline (messenger-relay, messenger-worker)",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 49},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 15,
|
||
"type": "timeseries",
|
||
"title": "Queue depth by stage",
|
||
"description": "Unfinished jobs from one source, the relay snapshot of PostgreSQL every 5 s: scheduled (waits for the next attempt), outbox (due, not published), published (not taken), processing. A snapshot older than 30 s is not reported; the Collector keeps the last point up to 5 min.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 0, "y": 50},
|
||
"fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "table", "placement": "bottom", "calcs": ["lastNotNull"]}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (messenger_queue_stage) (messenger_queue_depth{job=\"messenger-relay\"})",
|
||
"legendFormat": "{{messenger_queue_stage}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 16,
|
||
"type": "timeseries",
|
||
"title": "Age of the oldest unfinished job",
|
||
"description": "Seconds since the oldest unfinished job was accepted (queued with its job, before 202): accumulation, not handling time; 0 without unfinished jobs.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 8, "y": 50},
|
||
"fieldConfig": {"defaults": {"unit": "s", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max(messenger_queue_oldest_age_seconds{job=\"messenger-relay\"})",
|
||
"legendFormat": "oldest age"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 17,
|
||
"type": "timeseries",
|
||
"title": "Time to ready p50, p95 and p99",
|
||
"description": "From accepted upload (queued with its job) to committed ready, including waiting in the queue, retries and lease returns; jobs after replay are not counted.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 8, "x": 16, "y": 50},
|
||
"fieldConfig": {"defaults": {"unit": "s", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.5, sum by (le) (rate(messenger_job_time_to_ready_seconds_bucket{job=\"messenger-worker\"}[5m])))",
|
||
"legendFormat": "p50"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_time_to_ready_seconds_bucket{job=\"messenger-worker\"}[5m])))",
|
||
"legendFormat": "p95"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_job_time_to_ready_seconds_bucket{job=\"messenger-worker\"}[5m])))",
|
||
"legendFormat": "p99"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 18,
|
||
"type": "row",
|
||
"title": "Saturation (pools, worker, containers)",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 58},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 19,
|
||
"type": "timeseries",
|
||
"title": "PostgreSQL pool: used of max",
|
||
"description": "db.client.connection.count{state=used} to db.client.connection.max per process with the SDK (API replicas, worker, relay); instantaneous value once per export interval.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 0, "y": 59},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0, "max": 1}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job, instance) (db_client_connection_count{db_client_connection_state=\"used\"}) / sum by (job, instance) (db_client_connection_max)",
|
||
"legendFormat": "{{job}} {{instance}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 20,
|
||
"type": "timeseries",
|
||
"title": "PostgreSQL pool: waiting (left) and timeouts/s (right)",
|
||
"description": "Left axis, requests: requests waiting for a pool connection (instantaneous). Right axis, per second: pool checkouts that timed out.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 6, "y": 59},
|
||
"fieldConfig": {
|
||
"defaults": {"unit": "short", "min": 0, "custom": {"axisLabel": "requests"}},
|
||
"overrides": [
|
||
{
|
||
"matcher": {"id": "byFrameRefID", "options": "B"},
|
||
"properties": [
|
||
{"id": "unit", "value": "ops"},
|
||
{"id": "custom.axisPlacement", "value": "right"},
|
||
{"id": "custom.axisLabel", "value": "timeouts/s"}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job, instance) (db_client_connection_pending_requests)",
|
||
"legendFormat": "waiting {{job}} {{instance}}"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job) (rate(db_client_connection_timeouts_total[5m]))",
|
||
"legendFormat": "timeouts/s {{job}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 21,
|
||
"type": "timeseries",
|
||
"title": "Worker saturation",
|
||
"description": "Busy concurrency slots to capacity of all workers (instantaneous) and the window average: sum of delivery durations per second to capacity.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 12, "y": 59},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(messenger_worker_busy) / sum(messenger_worker_capacity)",
|
||
"legendFormat": "busy / capacity"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(messenger_job_duration_seconds_sum{job=\"messenger-worker\"}[5m])) / sum(messenger_worker_capacity)",
|
||
"legendFormat": "average over 5m"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 22,
|
||
"type": "timeseries",
|
||
"title": "Worker deliveries waiting for a slot",
|
||
"description": "Deliveries received from the broker (prefetch) that wait for a concurrency slot.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 6, "x": 18, "y": 59},
|
||
"fieldConfig": {"defaults": {"unit": "short", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(messenger_worker_waiting)",
|
||
"legendFormat": "waiting"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 23,
|
||
"type": "timeseries",
|
||
"title": "Container CPU of limit",
|
||
"description": "CPU of the container from its cgroup v2 (cpu.stat) to the CPU limit (cpu.max), API replicas, worker with render processes, relay. PostgreSQL, S3, broker, load balancer and cleaner are not in these metrics.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 67},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job, instance) (rate(container_cpu_time_seconds_total[5m])) / sum by (job, instance) (messenger_container_cpu_limit)",
|
||
"legendFormat": "{{job}} {{instance}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 24,
|
||
"type": "timeseries",
|
||
"title": "Container memory of limit",
|
||
"description": "memory.current of the container to memory.max, same processes as CPU.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 67},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job, instance) (container_memory_usage_bytes) / sum by (job, instance) (messenger_container_memory_limit_bytes)",
|
||
"legendFormat": "{{job}} {{instance}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 32,
|
||
"type": "row",
|
||
"title": "Load balancer",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 75},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 33,
|
||
"type": "timeseries",
|
||
"title": "LB responses per second by status class",
|
||
"description": "Responses of the public frontend entry to clients, including 502, 503 and 504 generated by the load balancer itself (HAProxy exporter through the Collector, job haproxy). The availability SLI is counted here.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 76},
|
||
"fieldConfig": {"defaults": {"unit": "reqps", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "table", "placement": "right", "calcs": ["lastNotNull"]}, "tooltip": {"mode": "multi", "sort": "desc"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (code) (rate(haproxy_frontend_http_responses_total{job=\"haproxy\",proxy=\"entry\"}[5m]))",
|
||
"legendFormat": "{{code}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 34,
|
||
"type": "timeseries",
|
||
"title": "5xx on LB and 5xx of API per second",
|
||
"description": "The difference is responses generated by the load balancer itself: with PostgreSQL down replicas leave the balancer, clients get 503 from it, and API metrics see almost no requests.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 76},
|
||
"fieldConfig": {"defaults": {"unit": "reqps", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(haproxy_frontend_http_responses_total{job=\"haproxy\",proxy=\"entry\",code=\"5xx\"}[5m]))",
|
||
"legendFormat": "5xx on LB"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\",http_response_status_code=~\"5..\"}[5m])) or on() vector(0)",
|
||
"legendFormat": "5xx of API"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 35,
|
||
"type": "timeseries",
|
||
"title": "Ready replicas in LB",
|
||
"description": "API replicas that pass the readiness check of the load balancer (haproxy_backend_active_servers of backend api).",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 84},
|
||
"fieldConfig": {"defaults": {"unit": "short", "min": 0, "decimals": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "single"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max(haproxy_backend_active_servers{job=\"haproxy\",proxy=\"api\"})",
|
||
"legendFormat": "ready replicas"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 36,
|
||
"type": "timeseries",
|
||
"title": "LB retries, redispatches and connection errors per second",
|
||
"description": "Backend api: retries on connection failure, redispatches to another replica, connection and response errors.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 84},
|
||
"fieldConfig": {"defaults": {"unit": "ops", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(haproxy_backend_retry_warnings_total{job=\"haproxy\",proxy=\"api\"}[5m]))",
|
||
"legendFormat": "retries"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(haproxy_backend_redispatch_warnings_total{job=\"haproxy\",proxy=\"api\"}[5m]))",
|
||
"legendFormat": "redispatches"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(haproxy_backend_connection_errors_total{job=\"haproxy\",proxy=\"api\"}[5m]))",
|
||
"legendFormat": "connection errors"
|
||
},
|
||
{
|
||
"refId": "D",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum(rate(haproxy_backend_response_errors_total{job=\"haproxy\",proxy=\"api\"}[5m]))",
|
||
"legendFormat": "response errors"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 37,
|
||
"type": "row",
|
||
"title": "Telemetry pipeline",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 92},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 38,
|
||
"type": "timeseries",
|
||
"title": "Collector export queues, share of capacity",
|
||
"description": "Sending queues of the Loki and Tempo exporters in bytes (16 and 8 MiB): a full queue rejects new data (enqueue_failed).",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 93},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0, "max": 1}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (exporter) (otelcol_exporter_queue_size{job=\"otel-collector\"}) / max by (exporter) (otelcol_exporter_queue_capacity{job=\"otel-collector\"})",
|
||
"legendFormat": "{{exporter}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 39,
|
||
"type": "timeseries",
|
||
"title": "SDK queues, share of capacity",
|
||
"description": "Span and log record queues of the SDK processors of API replicas, worker and relay ([telemetry] max_queue_size); the oldest item is dropped when a queue is full (queue_full).",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 93},
|
||
"fieldConfig": {"defaults": {"unit": "percentunit", "min": 0, "max": 1}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (job, instance) (otel_sdk_processor_span_queue_size / otel_sdk_processor_span_queue_capacity)",
|
||
"legendFormat": "spans {{job}} {{instance}}"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (job, instance) (otel_sdk_processor_log_queue_size / otel_sdk_processor_log_queue_capacity)",
|
||
"legendFormat": "logs {{job}} {{instance}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 40,
|
||
"type": "timeseries",
|
||
"title": "Telemetry lost per second by place",
|
||
"description": "Recording rule telemetry:lost_items:total by process, and its parts: Collector (refused by the memory limiter, queue full, retries expired) and SDK (queue full, failed export). Zero without losses.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 101},
|
||
"fieldConfig": {"defaults": {"unit": "ops", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job) (rate(telemetry:lost_items:total[5m])) or on() vector(0)",
|
||
"legendFormat": "lost {{job}}"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (metric, receiver, exporter) (rate(label_replace({__name__=~\"otelcol_(receiver_refused|exporter_send_failed|exporter_enqueue_failed)_(spans|log_records|metric_points)\"}, \"metric\", \"$1\", \"__name__\", \"otelcol_(.+)\")[5m:15s])) or on() vector(0)",
|
||
"legendFormat": "Collector {{metric}} {{receiver}}{{exporter}}"
|
||
},
|
||
{
|
||
"refId": "C",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "sum by (job, otel_component_type, error_type) (rate(label_replace({__name__=~\"otel_sdk_(processor|exporter)_(span|log)_(processed|exported)_total\",error_type!=\"\"}, \"metric\", \"$1\", \"__name__\", \"(.+)\")[5m:15s])) or on() vector(0)",
|
||
"legendFormat": "SDK {{job}} {{otel_component_type}} {{error_type}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 41,
|
||
"type": "timeseries",
|
||
"title": "Collector memory",
|
||
"description": "Go heap and memory obtained from the system by the Collector; the memory limiter refuses data at 200 MiB, GOMEMLIMIT is 160 MiB. memory_rss includes file pages of the binary and is not used.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 101},
|
||
"fieldConfig": {"defaults": {"unit": "bytes", "min": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max(otelcol_process_runtime_heap_alloc_bytes{job=\"otel-collector\"})",
|
||
"legendFormat": "heap"
|
||
},
|
||
{
|
||
"refId": "B",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max(otelcol_process_runtime_total_sys_memory_bytes{job=\"otel-collector\"})",
|
||
"legendFormat": "from the system"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 42,
|
||
"type": "timeseries",
|
||
"title": "Metrics targets up",
|
||
"description": "1 — Prometheus scrapes the target; haproxy comes through the Collector receiver.",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"gridPos": {"h": 8, "w": 24, "x": 0, "y": 109},
|
||
"fieldConfig": {"defaults": {"unit": "short", "min": 0, "max": 1, "decimals": 0}, "overrides": []},
|
||
"options": {"legend": {"displayMode": "list", "placement": "bottom"}, "tooltip": {"mode": "multi"}},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "prometheus", "uid": "prometheus"},
|
||
"expr": "max by (job) (up{job=~\"otel-collector|otel-collector-exporter|loki|tempo|prometheus|haproxy\"})",
|
||
"legendFormat": "{{job}}"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 11,
|
||
"type": "row",
|
||
"title": "Logs and traces",
|
||
"collapsed": false,
|
||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 117},
|
||
"panels": []
|
||
},
|
||
{
|
||
"id": 12,
|
||
"type": "logs",
|
||
"title": "API, worker and relay logs",
|
||
"description": "Records of stdout exported through the Collector; trace_id opens the trace in Tempo.",
|
||
"datasource": {"type": "loki", "uid": "loki"},
|
||
"gridPos": {"h": 12, "w": 24, "x": 0, "y": 118},
|
||
"options": {"showTime": true, "showLabels": false, "wrapLogMessage": true, "sortOrder": "Descending", "enableLogDetails": true, "dedupStrategy": "none", "prettifyLogMessage": false},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "loki", "uid": "loki"},
|
||
"expr": "{service_name=~\"messenger-.*\"}",
|
||
"queryType": "range"
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"id": 13,
|
||
"type": "table",
|
||
"title": "Recent traces",
|
||
"description": "TraceQL search of API requests and worker deliveries; an upload trace holds its relay publications and worker deliveries; a trace opens with links to its logs.",
|
||
"datasource": {"type": "tempo", "uid": "tempo"},
|
||
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 130},
|
||
"options": {"showHeader": true},
|
||
"targets": [
|
||
{
|
||
"refId": "A",
|
||
"datasource": {"type": "tempo", "uid": "tempo"},
|
||
"queryType": "traceql",
|
||
"query": "{ resource.service.name =~ \"messenger-.*\" }",
|
||
"limit": 20,
|
||
"tableType": "traces"
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|