ЛР6: OpenTelemetry, Collector, Prometheus/Loki/Tempo, Grafana, SLO и алерты, инциденты

This commit is contained in:
kalibr456
2026-11-01 21:25:38 +03:00
parent 470d9d6f1e
commit 79ef8807d5
156 changed files with 18393 additions and 35 deletions
+16
View File
@@ -0,0 +1,16 @@
# jobs-recovery: lab5: worker down -> 202 -> restart api+broker -> ready; broker down -> outbox waits
# date: 2026-11-01 20:31:04, commit: 470d9d6 + uncommitted changes
# command: python.exe student-tests/test_jobs.py worker-down broker-down
# exit code: 0, 55.2 s
--- worker-down: Защита п.2-3: worker остановлен -> 202 -> сообщение с вложением -> рестарт API+broker -> worker -> ready.
worker stopped
upload while worker is down -> 202 queued, attachment 0d7622f1-7c85-4c52-9dc0-2dad8f729c8d
message with attachment 201, content 409, other messages 201; job 6a45774d-0d88-46ec-87b9-70fb4c122bbd published, queue messages/unacked = (1, 0)
rabbitmq and api restarted with volumes; queue still holds 1 message(s); status queued
worker started -> same job 6a45774d-0d88-46ec-87b9-70fb4c122bbd ready, thumbnail downloadable; staging object deleted
--- broker-down: Брокер недоступен: API принимает (outbox), dispatcher копит и публикует после восстановления.
rabbitmq stopped
upload -> 202 and /health/ready 200 without broker; outbox row pending for job 34eb3c30-1942-4777-bce2-1ea2a4eca4c9
rabbitmq started -> dispatcher published the pending row -> ready
2 passed, 0 failed