docs: capture slo-alerts evidence on 15ea156

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-14 02:36:17 +03:00
co-authored by Claude Opus 5.5
parent 15ea156404
commit 107fe7f033
12 changed files with 768 additions and 150 deletions
+51 -45
View File
@@ -1,12 +1,12 @@
# `driver.py --port 8080 trace-chain` (change `job-trace-propagation`, задачи 12.1 и 13.11)
# `driver.py --port 8080 trace-chain` (change `job-trace-propagation`, задачи 12.1 и 13.11; change `slo-alerts`, задача 11.4)
- Основа: commit `72e2598` (fix: address job-trace-propagation verify findings), рабочее дерево
чистое (`git status --short` пуст до прогона; после — только файлы `evidence/`). Файлы `src/` и
`migrations/` (151) в контейнерах `api` (2), `relay`, `worker` и `cleaner` побайтно совпадают с
деревом commit (SHA-256 каждого файла); ревизия схемы `e4b8c2d17f90`; Grafana запущена
(17:55:46Z, рестарт в `telemetry-outage`) после последней правки dashboard JSON. Прежний прогон
этого файла — на `72cfa9a`, до правок verify.
- Дата: 2026-11-11, 17:56:20Z – 17:59:11Z (~3 мин), сразу после `telemetry-outage`; рабочий стенд
- Основа: 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`; Grafana запущена после последней правки dashboard
JSON (рестарт в `telemetry-outage`, 23:26Z). Прежние прогоны этого файла — на `72cfa9a` и на
`72e2598` (до change `slo-alerts`: dashboard без новых строк, SDK без внутренних метрик).
- Дата: 2026-11-13, 23:27:25Z – 23:30:16Z (~2,9 мин), сразу после `telemetry-outage`; рабочий стенд
`mtusi-lab6` (две реплики API, relay, worker, уборщик, Collector, Prometheus, Loki, Tempo,
Grafana), команда из корня репозитория:
`python3 .claude/skills/run-mtusi-messenger/driver.py --port 8080 trace-chain`, код выхода 0.
@@ -20,15 +20,21 @@
сокета Docker», «Панели уровня 4 после трафика», «Время до готовности в метрике» (шаг 5), «Проверка
цепочки» (команда целиком); `service-logging` — «Записи задания ведут к трассе» (записи worker по F
несут `trace_id` T записи «Uploaded attachment» запроса R).
- С правками verify (design, «Уточнения apply», п. 19, 22, 23): предусловие — глубина очереди 0
с ожиданием до 120 с (здесь дождалась сразу; не дождалась бы — код 2 «stand is not quiet»); CPU
каждого контейнера `api`, `worker`, `relay` вырос за прогон (`increase(container_cpu_time_seconds_total[161s])`
> 0 — сценарий «Пределы как в compose», «CPU растёт под нагрузкой»); панель пула с двумя
единицами (ожидающие и отказы в секунду) — среди 19 запросов панелей уровня 4 без ошибок и с
данными.
- С change `slo-alerts`: «Новые панели после трафика» — обход панелей с id от 14 теперь включает и
строки «SLO and alerts», «Load balancer», «Telemetry pipeline» (id от 25): 50 запросов к Prometheus
(было 19) без ошибок и с данными (`level 4 panel queries (50)`), макрос `$__range` подменён на
`1h` (design change `slo-alerts`, «Уточнения apply», п. 5). Цепочка, пулы, пределы и время до
`ready` — как на `72e2598`: внутренние метрики SDK и новый порядок сборки провайдеров трассы не
меняют.
- С правками verify change `job-trace-propagation` («Уточнения apply», п. 19, 22, 23): предусловие —
глубина очереди 0 с ожиданием до 120 с (здесь дождалась сразу, сразу после `telemetry-outage`; не
дождалась бы — код 2 «stand is not quiet»); CPU каждого контейнера `api`, `worker`, `relay` вырос
за прогон (`increase(container_cpu_time_seconds_total[156s])` > 0).
- Шаги 2 и 3: Tempo 3.1 собрал span producer и consumer разных попыток (повтор после `pause s3`,
replay) в одной трассе загрузки (п. 7). Время до `ready`: worker перезапускался дважды, проверка
складывает «тихие» значения двух процессов (п. 8).
replay) в одной трассе загрузки. Время до `ready`: worker перезапускался дважды; с change
`slo-alerts` счёт по-прежнему складывает «тихие» значения двух процессов: перезапуск через ~30 с
быстрее срока рядов экспортёра (1 мин), это ограничение design change `slo-alerts`, решение 6
(полный перезапуск дольше 2 мин проверяет `alerts-check`, шаг 1).
- Расхождений с design нет.
Ход прогона:
@@ -61,7 +67,7 @@ root: server span of the upload: POST /api/v1/chats/{chat_id}/attachments messen
producer spans: 2
consumer spans: 2
producers: messenger-relay, children of the root: yes
producer service.instance.id = relay instance_id: 0ac09c58168f
producer service.instance.id = relay instance_id: b90816dcb1cd
producer attempts: [1, 2]
retry reason of the second producer: storage_unavailable
consumers: messenger-worker, parent and link = own producer: yes
@@ -90,28 +96,28 @@ pool max: API replicas, worker, relay: ['10', '10'] ['2'] ['1']
pools with used above max: 0
worker capacity: 2
queue series only from relay: ['messenger-relay']
api 820012004c61 limits = docker inspect: 1 536870912
api 820012004c61 memory below the limit: yes
api 820012004c61 CPU grows during the run (increase over 161 s > 0): yes
api 6c86638cdbce limits = docker inspect: 1 536870912
api 6c86638cdbce memory below the limit: yes
api 6c86638cdbce CPU grows during the run (increase over 161 s > 0): yes
worker d04ac10e81df limits = docker inspect: 1 1073741824
worker d04ac10e81df memory below the limit: yes
worker d04ac10e81df CPU grows during the run (increase over 161 s > 0): yes
relay 0ac09c58168f limits = docker inspect: 0.25 268435456
relay 0ac09c58168f memory below the limit: yes
relay 0ac09c58168f CPU grows during the run (increase over 161 s > 0): yes
api 224ebf0e32ba limits = docker inspect: 1 536870912
api 224ebf0e32ba memory below the limit: yes
api 224ebf0e32ba CPU grows during the run (increase over 156 s > 0): yes
api 4b9782f7240b limits = docker inspect: 1 536870912
api 4b9782f7240b memory below the limit: yes
api 4b9782f7240b CPU grows during the run (increase over 156 s > 0): yes
worker dd039bfb3324 limits = docker inspect: 1 1073741824
worker dd039bfb3324 memory below the limit: yes
worker dd039bfb3324 CPU grows during the run (increase over 156 s > 0): yes
relay b90816dcb1cd limits = docker inspect: 0.25 268435456
relay b90816dcb1cd memory below the limit: yes
relay b90816dcb1cd CPU grows during the run (increase over 156 s > 0): yes
Docker socket mounted by any service: no
dashboard loaded: 200
level 4 panel queries (19) without error: []
level 4 panel queries (50) without error: []
level 4 panel queries with data: []
waiting for the time-to-ready histogram to settle
time to ready count grew by the uploads without replay: 5
time to ready sum grew by at least 3 x 32 s (worker stopped): yes
```
Итог («with data: []» — список панелей без данных пуст):
Итог:
```text
queue depth before reaches 0 within 120 s (no unfinished jobs) expected yes got yes
@@ -133,7 +139,7 @@ root: server span of the upload expected
producer spans expected 2 got 2
consumer spans expected 2 got 2
producers: messenger-relay, children of the root expected yes got yes
producer service.instance.id = relay instance_id expected 0ac09c58168f got 0ac09c58168f
producer service.instance.id = relay instance_id expected b90816dcb1cd got b90816dcb1cd
producer attempts expected [1, 2] got [1, 2]
retry reason of the second producer expected storage_unavailable got storage_unavailable
consumers: messenger-worker, parent and link = own producer expected yes got yes
@@ -160,21 +166,21 @@ pool max: API replicas, worker, relay expected
pools with used above max expected 0 got 0
worker capacity expected 2 got 2
queue series only from relay expected ['messenger-relay'] got ['messenger-relay']
api 820012004c61 limits = docker inspect expected 1 536870912 got 1 536870912
api 820012004c61 memory below the limit expected yes got yes
api 820012004c61 CPU grows during the run (increase over 161 s > 0) expected yes got yes
api 6c86638cdbce limits = docker inspect expected 1 536870912 got 1 536870912
api 6c86638cdbce memory below the limit expected yes got yes
api 6c86638cdbce CPU grows during the run (increase over 161 s > 0) expected yes got yes
worker d04ac10e81df limits = docker inspect expected 1 1073741824 got 1 1073741824
worker d04ac10e81df memory below the limit expected yes got yes
worker d04ac10e81df CPU grows during the run (increase over 161 s > 0) expected yes got yes
relay 0ac09c58168f limits = docker inspect expected 0.25 268435456 got 0.25 268435456
relay 0ac09c58168f memory below the limit expected yes got yes
relay 0ac09c58168f CPU grows during the run (increase over 161 s > 0) expected yes got yes
api 224ebf0e32ba limits = docker inspect expected 1 536870912 got 1 536870912
api 224ebf0e32ba memory below the limit expected yes got yes
api 224ebf0e32ba CPU grows during the run (increase over 156 s > 0) expected yes got yes
api 4b9782f7240b limits = docker inspect expected 1 536870912 got 1 536870912
api 4b9782f7240b memory below the limit expected yes got yes
api 4b9782f7240b CPU grows during the run (increase over 156 s > 0) expected yes got yes
worker dd039bfb3324 limits = docker inspect expected 1 1073741824 got 1 1073741824
worker dd039bfb3324 memory below the limit expected yes got yes
worker dd039bfb3324 CPU grows during the run (increase over 156 s > 0) expected yes got yes
relay b90816dcb1cd limits = docker inspect expected 0.25 268435456 got 0.25 268435456
relay b90816dcb1cd memory below the limit expected yes got yes
relay b90816dcb1cd CPU grows during the run (increase over 156 s > 0) expected yes got yes
Docker socket mounted by any service expected no got no
dashboard loaded expected 200 got 200
level 4 panel queries (19) without error expected [] got []
level 4 panel queries (50) without error expected [] got []
level 4 panel queries with data expected [] got []
time to ready count grew by the uploads without replay expected 5 got 5
time to ready sum grew by at least 3 x 32 s (worker stopped) expected yes got yes