docs: capture slo-alerts evidence on 15ea156
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+45
-31
@@ -1,12 +1,14 @@
|
||||
# `driver.py --port 8080 telemetry-check` (change `otel-telemetry`, задачи 11.1 и 12; change `job-trace-propagation`, задача 12.2)
|
||||
# `driver.py --port 8080 telemetry-check` (change `otel-telemetry`, задачи 11.1 и 12; change `job-trace-propagation`, задача 12.2; change `slo-alerts`, задача 11.4)
|
||||
|
||||
- Основа: commit `72cfa9a` (feat: propagate trace context through outbox and add pipeline saturation
|
||||
metrics), рабочее дерево чистое (`git status --short` пуст до прогона; новые файлы — только
|
||||
`evidence/`). Файлы `src/` и `migrations/` в контейнерах `api` (2), `relay`, `worker` и `cleaner`
|
||||
побайтно совпадают с деревом commit (SHA-256 каждого файла); ревизия схемы `e4b8c2d17f90`.
|
||||
Прежний прогон этого файла — на `68f1e97` (до change `job-trace-propagation`).
|
||||
- Дата: 2026-11-11, 16:59:50Z – 17:01:41Z (~1,9 мин); рабочий стенд `mtusi-lab6` (две реплики API,
|
||||
relay, worker, уборщик, Collector, Prometheus, Loki, Tempo, Grafana), команда из корня репозитория:
|
||||
- Основа: commit `15ea156` (feat: add SLOs, Prometheus alert rules and telemetry loss accounting),
|
||||
рабочее дерево чистое (вне `evidence/` изменений нет). Файлы `src/` и `migrations/` (151) в
|
||||
контейнерах `api` (2), `relay`, `worker` и `cleaner` побайтно совпадают с деревом commit (SHA-256
|
||||
каждого файла); ревизия схемы `e4b8c2d17f90`. Прежние прогоны этого файла — на `68f1e97` (до
|
||||
change `job-trace-propagation`) и на `72cfa9a` (до change `slo-alerts`: dashboard без строк «SLO
|
||||
and alerts», «Load balancer», «Telemetry pipeline», SDK без внутренних метрик).
|
||||
- Дата: 2026-11-13, 23:22:43Z – 23:24:43Z (~2 мин), сразу после `backend-outage`
|
||||
(`evidence/telemetry/backend-outage.md`); рабочий стенд `mtusi-lab6` (две реплики API, relay,
|
||||
worker, уборщик, Collector, Prometheus, Loki, Tempo, Grafana), команда из корня репозитория:
|
||||
`python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 telemetry-check`, код выхода 0.
|
||||
- Всё — через HTTP API Grafana на `127.0.0.1:3000` с паролем из `.env` (источники-прокси uid
|
||||
`prometheus`, `loki`, `tempo`); пароль, токены и тела в вывод не попадают. Пароль, `username`,
|
||||
@@ -22,17 +24,22 @@
|
||||
запроса», «Трасса задания», «Отказ S3 в трассе», «Health и фоновые циклы без трасс», «Проба
|
||||
приватности», «Запрос найден», «Задание найдено»; `service-logging` — «Записи запроса ведут к
|
||||
трассе», «Записи задания ведут к трассе», «Запись в Loki совпадает со stdout»;
|
||||
`service-configuration` — «Переменные OTEL_* не действуют».
|
||||
- С change `job-trace-propagation`: `observability` «Ресурс relay» (span producer —
|
||||
`messenger-relay`, `service.instance.id` = `instance_id` stdout relay; relay — в пробе сетей
|
||||
хранилищ); `service-logging` «Записи relay в Loki» (запись прохода с публикацией в stdout и та же
|
||||
в Loki) и «Проход relay без полей трассы» (без `trace_id` в обоих; корней-span relay в Tempo
|
||||
нет). Шаги задания ищутся по consumer span `ready` трассы загрузки, а не по корню: его родитель —
|
||||
span producer relay; трасса задания = трасса загрузки (`trace_id` записи «Uploaded attachment»).
|
||||
- Свой запрос: `X-Request-Id` `fa505042431b47c0b898571fb326d873`, `X-Instance-Id`
|
||||
`a4a1f203ef70`, trace-id `d09ff137a735b772a71fc19d90ab338d`; трасса загрузки
|
||||
`95d2de2fc407f300bb758dd9586bf8d8`; проба приватности просмотрела 47 записей Loki, 28 трасс Tempo
|
||||
и 1350 рядов Prometheus окна.
|
||||
`service-configuration` — «Переменные OTEL_* не действуют». С change `job-trace-propagation`:
|
||||
`observability` «Ресурс relay», `service-logging` «Записи relay в Loki» и «Проход relay без полей
|
||||
трассы»; шаги задания — по consumer span `ready` трассы загрузки (его родитель — span producer
|
||||
relay).
|
||||
- С change `slo-alerts` (design, «Уточнения apply», пп. 5, 6): `observability` «Метрики балансировщика
|
||||
без доступа к сети хранилищ» (строки `LB networks` — только `default`, `LB stats port published on
|
||||
host` — нет, `prometheus has an LB target` — нет, `LB series with job haproxy…`, цель `haproxy`
|
||||
в списке `up` = 1) и `load-balancing` «Метрики балансировщика» (`LB frontend responses grew by 20
|
||||
or more` — 20 своих запросов через LB); «Новые панели после трафика» — `dashboard panel queries
|
||||
(57) without error: 0` и `panel queries with data after traffic: []`: все 57 запросов панелей к
|
||||
Prometheus (из них новых с id от 25 — 31, макрос `$__range` подменён на `1h`) выполнены без
|
||||
ошибки и с данными на стенде без оповещений, в том числе панели потерь и истории оповещений (`or
|
||||
on() vector(0)`).
|
||||
- Свой запрос: `X-Request-Id` `c126a16170d94f35b43139e1289b2d81`, `X-Instance-Id` `4b9782f7240b`,
|
||||
trace-id `6e280eb8369840989e91c7c4a2a062e6`; трасса загрузки `878badb606a661c26d22b71170770d21`;
|
||||
проба приватности просмотрела 48 записей Loki, 29 трасс Tempo и 903 ряда Prometheus окна.
|
||||
|
||||
```
|
||||
grafana without credentials expected 401 got 401
|
||||
@@ -55,6 +62,12 @@ prometheus target otel-collector-exporter up expected 1
|
||||
prometheus target loki up expected 1 got 1
|
||||
prometheus target tempo up expected 1 got 1
|
||||
prometheus target prometheus up expected 1 got 1
|
||||
prometheus target haproxy up expected 1 got 1
|
||||
LB networks expected ['default'] got ['default']
|
||||
LB stats port published on host expected no got no
|
||||
prometheus has an LB target expected no got no
|
||||
LB series with job haproxy (frontend, backend, ready) expected yes got yes
|
||||
LB frontend responses grew by 20 or more expected yes got yes
|
||||
register probe user expected 201 got 201
|
||||
login by Basic expected 201 got 201
|
||||
create chat expected 201 got 201
|
||||
@@ -75,15 +88,15 @@ one trace_id and span_id in them expected 1
|
||||
trace_id format expected yes got yes
|
||||
Loki record of the request expected 1 got 1
|
||||
Loki service_name expected messenger-api got messenger-api
|
||||
Loki service_instance_id = X-Instance-Id expected a4a1f203ef70 got a4a1f203ef70
|
||||
Loki instance_id = X-Instance-Id expected a4a1f203ef70 got a4a1f203ef70
|
||||
Loki trace_id = stdout expected d09ff137a735b772a71fc19d90ab338d got d09ff137a735b772a71fc19d90ab338d
|
||||
Loki service_instance_id = X-Instance-Id expected 4b9782f7240b got 4b9782f7240b
|
||||
Loki instance_id = X-Instance-Id expected 4b9782f7240b got 4b9782f7240b
|
||||
Loki trace_id = stdout expected 6e280eb8369840989e91c7c4a2a062e6 got 6e280eb8369840989e91c7c4a2a062e6
|
||||
Loki event, method, path, status, duration = stdout expected yes got yes
|
||||
Tempo server span expected POST /api/v1/chats/{chat_id}/messages SPAN_KIND_SERVER got POST /api/v1/chats/{chat_id}/messages SPAN_KIND_SERVER
|
||||
server span status code expected 201 got 201
|
||||
server span request id = X-Request-Id expected fa505042431b47c0b898571fb326d873 got fa505042431b47c0b898571fb326d873
|
||||
server span request id = X-Request-Id expected c126a16170d94f35b43139e1289b2d81 got c126a16170d94f35b43139e1289b2d81
|
||||
resource service.name expected messenger-api got messenger-api
|
||||
resource service.instance.id expected a4a1f203ef70 got a4a1f203ef70
|
||||
resource service.instance.id expected 4b9782f7240b got 4b9782f7240b
|
||||
resource service.version = contract expected 1.6.0 got 1.6.0
|
||||
resource deployment.environment.name expected lab got lab
|
||||
PostgreSQL query spans under it expected yes got yes
|
||||
@@ -96,14 +109,14 @@ traceparent request has its own trace expected yes
|
||||
spans of the foreign trace-id in Tempo expected 0 got 0
|
||||
its server span has no parent expected yes got yes
|
||||
Loki worker record of the attachment expected 1 got 1
|
||||
job trace = upload trace (trace_id of Uploaded attachment) expected 95d2de2fc407f300bb758dd9586bf8d8 got 95d2de2fc407f300bb758dd9586bf8d8
|
||||
job trace = upload trace (trace_id of Uploaded attachment) expected 878badb606a661c26d22b71170770d21 got 878badb606a661c26d22b71170770d21
|
||||
worker stdout records carry the job trace_id expected yes got yes
|
||||
Tempo consumer span in the upload trace expected SPAN_KIND_CONSUMER ready got SPAN_KIND_CONSUMER ready
|
||||
worker resource service.name expected messenger-worker got messenger-worker
|
||||
worker service.instance.id = instance_id of its stdout expected b221c6088b4b got b221c6088b4b
|
||||
worker service.instance.id = instance_id of its stdout expected dd039bfb3324 got dd039bfb3324
|
||||
consumer span parent: relay producer span expected SPAN_KIND_PRODUCER got SPAN_KIND_PRODUCER
|
||||
producer resource service.name expected messenger-relay got messenger-relay
|
||||
producer service.instance.id = instance_id of relay stdout expected f1a1d8fef0bc got f1a1d8fef0bc
|
||||
producer service.instance.id = instance_id of relay stdout expected b90816dcb1cd got b90816dcb1cd
|
||||
relay pass record with publication in stdout expected yes got yes
|
||||
same relay pass records in Loki (event, published) expected yes got yes
|
||||
relay pass records without trace_id in stdout and Loki expected yes got yes
|
||||
@@ -155,7 +168,7 @@ _OTHER series without http_route expected yes
|
||||
forbidden label names expected [] got []
|
||||
label values that are UUIDs expected 0 got 0
|
||||
label values with BREW, PROPFIND or the odd UUID expected 0 got 0
|
||||
dashboard panel queries (26) without error expected 0 got 0
|
||||
dashboard panel queries (57) without error expected 0 got 0
|
||||
panel queries with data after traffic expected [] got []
|
||||
U in telemetry expected [] got []
|
||||
P in telemetry expected [] got []
|
||||
@@ -169,7 +182,7 @@ foreign trace-id in telemetry expected []
|
||||
pipeline back after restart expected yes got yes
|
||||
same Loki record after restart expected yes got yes
|
||||
same trace after restart expected yes got yes
|
||||
same metric value at the saved time expected 18 got 18
|
||||
same metric value at the saved time expected 10 got 10
|
||||
PASS: own request and job are found in Loki, Tempo and Prometheus through Grafana, no secrets in telemetry
|
||||
```
|
||||
|
||||
@@ -178,5 +191,6 @@ PASS: own request and job are found in Loki, Tempo and Prometheus through Grafan
|
||||
prometheus loki tempo` (параметр `time` запроса). «Span-to-logs query» — запрос `tracesToLogsV2`
|
||||
источника Tempo из `infra/otel/grafana/datasources.yaml`, в который подставлены `service.name`
|
||||
ресурса и trace-id своей трассы: он возвращает записи только этой трассы — тот же переход, что
|
||||
открывает ссылка из span в Grafana. «Panel queries with data after traffic: []» — список панелей
|
||||
без данных пуст (26 запросов dashboard, в том числе уровня 4).
|
||||
открывает ссылка из span в Grafana. «Dashboard panel queries (57) without error: 0» — число
|
||||
запросов панелей к Prometheus с ошибкой; «panel queries with data after traffic: []» — список
|
||||
запросов без данных пуст (57 запросов dashboard: уровни 3 и 4 и новые строки change `slo-alerts`).
|
||||
|
||||
Reference in New Issue
Block a user