{ "uid": "messenger-overview", "title": "Messenger — API, worker, очередь", "tags": [ "lab6", "messenger" ], "timezone": "browser", "schemaVersion": 39, "version": 1, "refresh": "10s", "time": { "from": "now-30m", "to": "now" }, "editable": false, "graphTooltip": 1, "panels": [ { "type": "row", "title": "Сводка и SLO", "id": 1, "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "panels": [] }, { "type": "stat", "title": "RPS API (бизнес)", "id": 2, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "sum(rate(http_server_request_duration_seconds_count)) без /health/*", "gridPos": { "h": 4, "w": 4, "x": 0, "y": 1 }, "fieldConfig": { "defaults": { "unit": "reqps", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "messenger:http_requests:rate1m", "refId": "A" } ] }, { "type": "stat", "title": "Доля 5xx (1m)", "id": 3, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "5xx / все бизнес-запросы (кроме /health/*). SLO: ≤ 0.5%", "gridPos": { "h": 4, "w": 4, "x": 4, "y": 1 }, "fieldConfig": { "defaults": { "unit": "percentunit", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 0.005 }, { "color": "red", "value": 0.05 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "messenger:http_error_ratio:rate1m", "refId": "A" } ] }, { "type": "stat", "title": "Быстрее 250 ms (5m)", "id": 4, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "SLO задержки: ≥ 95% бизнес-запросов быстрее 250 ms", "gridPos": { "h": 4, "w": 4, "x": 8, "y": 1 }, "fieldConfig": { "defaults": { "unit": "percentunit", "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "green", "value": 0.95 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "messenger:http_fast_ratio:rate5m", "refId": "A" } ] }, { "type": "stat", "title": "Ready быстрее 30 s (5m)", "id": 5, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "SLO времени до ready: ≥ 95% вложений", "gridPos": { "h": 4, "w": 4, "x": 12, "y": 1 }, "fieldConfig": { "defaults": { "unit": "percentunit", "thresholds": { "mode": "absolute", "steps": [ { "color": "red", "value": null }, { "color": "green", "value": 0.95 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "messenger:time_to_ready_fast_ratio:rate5m", "refId": "A" } ] }, { "type": "stat", "title": "Старейшая job", "id": 6, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 4, "w": 4, "x": 16, "y": 1 }, "fieldConfig": { "defaults": { "unit": "s", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "orange", "value": 30 }, { "color": "red", "value": 60 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "max(messenger_jobs_oldest_age_seconds)", "refId": "A" } ] }, { "type": "stat", "title": "Alerts firing", "id": 7, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 4, "w": 4, "x": 20, "y": 1 }, "fieldConfig": { "defaults": { "unit": "none", "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 1 } ] } }, "overrides": [] }, "options": { "reduceOptions": { "calcs": [ "lastNotNull" ] }, "colorMode": "value" }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "count(ALERTS{alertstate=\"firing\"}) or vector(0)", "refId": "A" } ] }, { "type": "row", "title": "API (messenger-api)", "id": 8, "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 5 }, "panels": [] }, { "type": "timeseries", "title": "RPS по маршруту и классу ответа", "id": 9, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Счётчик = _count histogram (одна метрика, не две)", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 6 }, "fieldConfig": { "defaults": { "unit": "reqps", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (http_route, http_response_status_class) (rate(http_server_request_duration_seconds_count{job=\"messenger-api\", http_route!~\"/health/.*\"}[$__rate_interval]))", "legendFormat": "{{http_route}} {{http_response_status_class}}", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Задержка API p50 / p95 / p99 (все реплики)", "id": 10, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "histogram_quantile по сумме buckets всех реплик; среднее p99 реплик не используется", "gridPos": { "h": 8, "w": 8, "x": 8, "y": 6 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.5, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\", http_route!~\"/health/.*\"}[$__rate_interval])))", "legendFormat": "p50", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\", http_route!~\"/health/.*\"}[$__rate_interval])))", "legendFormat": "p95", "refId": "B", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.99, sum by (le) (rate(http_server_request_duration_seconds_bucket{job=\"messenger-api\", http_route!~\"/health/.*\"}[$__rate_interval])))", "legendFormat": "p99", "refId": "C", "exemplar": true } ] }, { "type": "timeseries", "title": "Доля ошибок 5xx и 4xx", "id": 11, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 16, "y": 6 }, "fieldConfig": { "defaults": { "unit": "percentunit", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } }, "min": 0 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "messenger:http_error_ratio:rate1m", "legendFormat": "5xx / все", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate(http_server_request_duration_seconds_count{job=\"messenger-api\", http_route!~\"/health/.*\", http_response_status_class=\"4xx\"}[1m])) / messenger:http_requests:rate1m", "legendFormat": "4xx / все (ошибки клиента)", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "p95 по маршруту", "id": 12, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 12, "x": 0, "y": 14 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "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\", http_route!~\"/health/.*\"}[$__rate_interval])))", "legendFormat": "{{http_route}}", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Запросы в обработке (in-flight) по реплике", "id": 13, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 12, "x": 12, "y": 14 }, "fieldConfig": { "defaults": { "unit": "none", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (instance) (http_server_active_requests{job=\"messenger-api\"})", "legendFormat": "{{instance}}", "refId": "A", "exemplar": true } ] }, { "type": "row", "title": "Worker и очередь", "id": 14, "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 22 }, "panels": [] }, { "type": "timeseries", "title": "Jobs по исходу (rate)", "id": 15, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "done / retry / failed / duplicate / not_due / requeue …", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 23 }, "fieldConfig": { "defaults": { "unit": "ops", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (outcome) (rate(messenger_jobs_processed_total[$__rate_interval]))", "legendFormat": "{{outcome}}", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Длительность обработки job p50 / p95 / p99", "id": 16, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 8, "y": 23 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.5, sum by (le) (rate(messenger_job_duration_seconds_bucket{outcome=\"done\"}[$__rate_interval])))", "legendFormat": "p50", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_job_duration_seconds_bucket{outcome=\"done\"}[$__rate_interval])))", "legendFormat": "p95", "refId": "B", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.99, sum by (le) (rate(messenger_job_duration_seconds_bucket{outcome=\"done\"}[$__rate_interval])))", "legendFormat": "p99", "refId": "C", "exemplar": true } ] }, { "type": "timeseries", "title": "Время до ready (202 → ready) p50 / p95", "id": 17, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 16, "y": 23 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.5, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[$__rate_interval])))", "legendFormat": "p50", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_attachment_time_to_ready_seconds_bucket[$__rate_interval])))", "legendFormat": "p95", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "Очередь: jobs по состоянию (PostgreSQL)", "id": 18, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 31 }, "fieldConfig": { "defaults": { "unit": "none", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (state) (messenger_jobs_backlog)", "legendFormat": "{{state}}", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(messenger_outbox_pending)", "legendFormat": "outbox не опубликовано", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "Возраст старейшей job / outbox", "id": 19, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "Backlog (сколько ждёт) ≠ latency обработки; alert при > 60 s", "gridPos": { "h": 8, "w": 8, "x": 8, "y": 31 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "max(messenger_jobs_oldest_age_seconds)", "legendFormat": "job (queued/processing)", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "max(messenger_outbox_oldest_age_seconds)", "legendFormat": "outbox", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "RabbitMQ: сообщения в очередях", "id": 20, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 16, "y": 31 }, "fieldConfig": { "defaults": { "unit": "none", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (queue) (rabbitmq_detailed_queue_messages_ready or rabbitmq_queue_messages_ready)", "legendFormat": "ready {{queue}}", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (queue) (rabbitmq_detailed_queue_messages_unacked or rabbitmq_queue_messages_unacked)", "legendFormat": "unacked {{queue}}", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "Saturation worker (busy / capacity)", "id": 21, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 39 }, "fieldConfig": { "defaults": { "unit": "percentunit", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } }, "min": 0, "max": 1 }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(messenger_worker_busy) / sum(messenger_worker_capacity)", "legendFormat": "занято слотов", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Publish outbox → broker (confirm) p95", "id": 22, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 8, "y": 39 }, "fieldConfig": { "defaults": { "unit": "s", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "histogram_quantile(0.95, sum by (le) (rate(messenger_outbox_publish_duration_seconds_bucket[$__rate_interval])))", "legendFormat": "p95", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate(messenger_outbox_published_total[$__rate_interval]))", "legendFormat": "сообщений/с", "refId": "B", "exemplar": true } ] }, { "type": "timeseries", "title": "Пул БД: занято / ожидания", "id": 23, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "empty_acquire — acquire, которому пришлось ждать свободное соединение", "gridPos": { "h": 8, "w": 8, "x": 16, "y": 39 }, "fieldConfig": { "defaults": { "unit": "none", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (job) (pgxpool_acquired_connections)", "legendFormat": "занято {{job}}", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (job) (pgxpool_max_connections)", "legendFormat": "max {{job}}", "refId": "B", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (job) (rate(pgxpool_empty_acquire_total[$__rate_interval]))", "legendFormat": "ожиданий/с {{job}}", "refId": "C", "exemplar": true } ] }, { "type": "row", "title": "Ресурсы процессов и телеметрии", "id": 24, "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 47 }, "panels": [] }, { "type": "timeseries", "title": "CPU процессов", "id": 25, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "доля одного ядра; лимиты контейнеров в compose.yaml", "gridPos": { "h": 8, "w": 8, "x": 0, "y": 48 }, "fieldConfig": { "defaults": { "unit": "percentunit", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (job, instance) (rate(process_cpu_time_seconds_total[$__rate_interval]))", "legendFormat": "{{job}} {{instance}}", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Память Go (used)", "id": 26, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 8, "y": 48 }, "fieldConfig": { "defaults": { "unit": "bytes", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum by (job, instance) (go_memory_used_bytes)", "legendFormat": "{{job}} {{instance}}", "refId": "A", "exemplar": true } ] }, { "type": "timeseries", "title": "Collector: принято / отправлено / потеряно spans", "id": 27, "datasource": { "type": "prometheus", "uid": "prometheus" }, "description": "", "gridPos": { "h": 8, "w": 8, "x": 16, "y": 48 }, "fieldConfig": { "defaults": { "unit": "none", "custom": { "fillOpacity": 10, "showPoints": "never", "stacking": { "mode": "none" } } }, "overrides": [] }, "options": { "legend": { "displayMode": "list", "placement": "bottom" }, "tooltip": { "mode": "multi" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate({__name__=~\"otelcol_receiver_accepted_spans(_total)?\"}[$__rate_interval]))", "legendFormat": "принято", "refId": "A", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate({__name__=~\"otelcol_exporter_sent_spans(_total)?\"}[$__rate_interval]))", "legendFormat": "отправлено", "refId": "B", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate({__name__=~\"otelcol_exporter_send_failed_spans(_total)?\"}[$__rate_interval]))", "legendFormat": "не доставлено", "refId": "C", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(rate({__name__=~\"otelcol_receiver_refused_spans(_total)?\"}[$__rate_interval]))", "legendFormat": "отклонено (memory_limiter)", "refId": "D", "exemplar": true }, { "datasource": { "type": "prometheus", "uid": "prometheus" }, "expr": "sum(otelcol_exporter_queue_size)", "legendFormat": "очередь экспортёров", "refId": "E", "exemplar": true } ] }, { "type": "row", "title": "Логи и трассы", "id": 28, "collapsed": false, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 56 }, "panels": [] }, { "type": "logs", "title": "Логи API и worker (ошибки и предупреждения)", "id": 29, "datasource": { "type": "loki", "uid": "loki" }, "gridPos": { "h": 10, "w": 12, "x": 0, "y": 57 }, "options": { "showTime": true, "wrapLogMessage": true, "enableLogDetails": true, "sortOrder": "Descending" }, "targets": [ { "datasource": { "type": "loki", "uid": "loki" }, "refId": "A", "expr": "{service_name=~\"messenger-(api|worker|relay)\"} | detected_level=~\"warn|error|WARN|ERROR\"" } ] }, { "type": "table", "title": "Трассы worker (последние)", "id": 30, "datasource": { "type": "tempo", "uid": "tempo" }, "gridPos": { "h": 10, "w": 12, "x": 12, "y": 57 }, "targets": [ { "datasource": { "type": "tempo", "uid": "tempo" }, "refId": "A", "queryType": "traceql", "limit": 20, "query": "{resource.service.name=\"messenger-worker\" && name=\"attachment.process process\"}" } ] } ], "templating": { "list": [] }, "annotations": { "list": [ { "name": "Alerts", "datasource": { "type": "prometheus", "uid": "prometheus" }, "enable": true, "iconColor": "red", "expr": "ALERTS{alertstate=\"firing\"}", "titleFormat": "{{alertname}}", "step": "10s" } ] } }