Forward the lab 5 foundation while preserving lab 6 telemetry
Source: immutable lab5 snapshot f88e9ba43cdfd7eb6a5a7ae5feb4247b4e820071; forward the allowed diff from 64d5c67. Carry SQLAlchemy, Alembic, reliability fixes, versioned jobs, infrastructure and student tests without changing protected coursework files.
Validation: make check, validate, lint; 515 student tests passed with one Linux-only skip; public smoke with telemetry enabled and repeat migration passed. Stop the owned stack and retain volumes. Preserve the existing OTel work in progress; grade implementation remains a separate phase.
This commit is contained in:
@@ -0,0 +1,307 @@
|
||||
{
|
||||
"uid": "messenger-pipeline",
|
||||
"title": "Messenger · Worker",
|
||||
"description": "Задания worker: исходы, длительность обработки, логи и трассы.",
|
||||
"tags": [
|
||||
"messenger",
|
||||
"lab6",
|
||||
"worker"
|
||||
],
|
||||
"timezone": "browser",
|
||||
"editable": false,
|
||||
"graphTooltip": 1,
|
||||
"refresh": "10s",
|
||||
"schemaVersion": 41,
|
||||
"version": 1,
|
||||
"time": {
|
||||
"from": "now-30m",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {},
|
||||
"fiscalYearStartMonth": 0,
|
||||
"liveNow": false,
|
||||
"links": [
|
||||
{
|
||||
"title": "Messenger",
|
||||
"type": "dashboards",
|
||||
"tags": [
|
||||
"messenger"
|
||||
],
|
||||
"asDropdown": true,
|
||||
"includeVars": false,
|
||||
"keepTime": true
|
||||
}
|
||||
],
|
||||
"annotations": {
|
||||
"list": [
|
||||
{
|
||||
"builtIn": 1,
|
||||
"datasource": {
|
||||
"type": "grafana",
|
||||
"uid": "-- Grafana --"
|
||||
},
|
||||
"enable": true,
|
||||
"hide": true,
|
||||
"iconColor": "rgba(0, 211, 255, 1)",
|
||||
"name": "Annotations & Alerts",
|
||||
"type": "dashboard"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"enable": true,
|
||||
"iconColor": "red",
|
||||
"name": "Firing alerts",
|
||||
"expr": "ALERTS{alertstate=\"firing\"}",
|
||||
"step": "15s",
|
||||
"titleFormat": "{{alertname}}",
|
||||
"textFormat": "{{alertname}} firing",
|
||||
"useValueForTime": false
|
||||
}
|
||||
]
|
||||
},
|
||||
"templating": {
|
||||
"list": []
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"type": "row",
|
||||
"title": "Worker",
|
||||
"collapsed": false,
|
||||
"panels": [],
|
||||
"id": 8,
|
||||
"gridPos": {
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"w": 24,
|
||||
"h": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Jobs по исходу",
|
||||
"description": "",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"refId": "A",
|
||||
"expr": "sum by (job_type, outcome) (rate(messenger_jobs_processed_total[$__rate_interval]))",
|
||||
"legendFormat": "{{job_type}} {{outcome}}",
|
||||
"range": true,
|
||||
"exemplar": false
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "ops",
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineWidth": 1,
|
||||
"fillOpacity": 10,
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"mode": "normal",
|
||||
"group": "A"
|
||||
}
|
||||
},
|
||||
"min": 0
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"calcs": [
|
||||
"lastNotNull",
|
||||
"max"
|
||||
]
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "desc"
|
||||
}
|
||||
},
|
||||
"id": 9,
|
||||
"gridPos": {
|
||||
"x": 0,
|
||||
"y": 1,
|
||||
"w": 12,
|
||||
"h": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "timeseries",
|
||||
"title": "Длительность обработки job",
|
||||
"description": "",
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"refId": "A",
|
||||
"expr": "histogram_quantile(0.5, sum by (le, job_type) (rate(messenger_job_duration_seconds_bucket{}[$__rate_interval])))",
|
||||
"legendFormat": "p50 {{job_type}}",
|
||||
"range": true,
|
||||
"exemplar": true
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"refId": "B",
|
||||
"expr": "histogram_quantile(0.95, sum by (le, job_type) (rate(messenger_job_duration_seconds_bucket{}[$__rate_interval])))",
|
||||
"legendFormat": "p95 {{job_type}}",
|
||||
"range": true,
|
||||
"exemplar": true
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "prometheus"
|
||||
},
|
||||
"refId": "C",
|
||||
"expr": "histogram_quantile(0.99, sum by (le, job_type) (rate(messenger_job_duration_seconds_bucket{}[$__rate_interval])))",
|
||||
"legendFormat": "p99 {{job_type}}",
|
||||
"range": true,
|
||||
"exemplar": true
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "s",
|
||||
"custom": {
|
||||
"drawStyle": "line",
|
||||
"lineWidth": 1,
|
||||
"fillOpacity": 10,
|
||||
"showPoints": "never",
|
||||
"spanNulls": false,
|
||||
"stacking": {
|
||||
"mode": "none",
|
||||
"group": "A"
|
||||
}
|
||||
},
|
||||
"min": 0
|
||||
},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {
|
||||
"legend": {
|
||||
"displayMode": "table",
|
||||
"placement": "bottom",
|
||||
"calcs": [
|
||||
"lastNotNull",
|
||||
"max"
|
||||
]
|
||||
},
|
||||
"tooltip": {
|
||||
"mode": "multi",
|
||||
"sort": "desc"
|
||||
}
|
||||
},
|
||||
"id": 10,
|
||||
"gridPos": {
|
||||
"x": 12,
|
||||
"y": 1,
|
||||
"w": 12,
|
||||
"h": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "row",
|
||||
"title": "Логи и трассы worker",
|
||||
"collapsed": false,
|
||||
"panels": [],
|
||||
"id": 13,
|
||||
"gridPos": {
|
||||
"x": 0,
|
||||
"y": 9,
|
||||
"w": 24,
|
||||
"h": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "logs",
|
||||
"title": "Логи worker",
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "loki",
|
||||
"uid": "loki"
|
||||
},
|
||||
"refId": "A",
|
||||
"expr": "{service_name=\"messenger-worker\"}",
|
||||
"queryType": "range"
|
||||
}
|
||||
],
|
||||
"options": {
|
||||
"showTime": true,
|
||||
"wrapLogMessage": true,
|
||||
"sortOrder": "Descending",
|
||||
"enableLogDetails": true,
|
||||
"dedupStrategy": "none",
|
||||
"prettifyLogMessage": false
|
||||
},
|
||||
"id": 14,
|
||||
"gridPos": {
|
||||
"x": 0,
|
||||
"y": 10,
|
||||
"w": 12,
|
||||
"h": 10
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "table",
|
||||
"title": "Трассы worker",
|
||||
"datasource": {
|
||||
"type": "tempo",
|
||||
"uid": "tempo"
|
||||
},
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "tempo",
|
||||
"uid": "tempo"
|
||||
},
|
||||
"refId": "A",
|
||||
"queryType": "traceql",
|
||||
"query": "{ resource.service.name = \"messenger-worker\" }",
|
||||
"limit": 20,
|
||||
"tableType": "traces"
|
||||
}
|
||||
],
|
||||
"fieldConfig": {
|
||||
"defaults": {},
|
||||
"overrides": []
|
||||
},
|
||||
"options": {},
|
||||
"id": 15,
|
||||
"gridPos": {
|
||||
"x": 12,
|
||||
"y": 10,
|
||||
"w": 12,
|
||||
"h": 10
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user