ЛР 6 — БВТ2301 — Курлова — на 5 (трек 1 «Цена наблюдаемости»)

Перенесён минимум lab5 без изменения API и добавлена наблюдаемость:
- OTel SDK в API и worker: traces, metrics, logs по OTLP; W3C trace context
  API -> outbox -> RabbitMQ -> worker (producer/consumer spans, retry в той же трассе);
- OTel Collector (memory_limiter, scrub, batch, ограниченные очереди, профиль tail sampling),
  Prometheus, Loki, Tempo, Grafana с provisioning, dashboard и 6 alert rules с runbooks;
- проверки: наблюдаемость и приватность, инциденты A/B/C, насыщение worker,
  переполнение очереди exporter, эксперимент трека 1 (4 конфигурации x 3 прогона);
- CI job со сборкой и запуском стенда; REPORT.md с доказательствами в evidence/.
This commit is contained in:
alenchha
2026-11-11 09:24:27 +03:00
parent 470d9d6f1e
commit 0638263029
86 changed files with 10512 additions and 21 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
# Credentials come from a Docker secret; RabbitMQ's config cannot read files, so render a conf.d fragment at start.
set -eu
PASS="$(cat /run/secrets/rabbitmq_password)"
mkdir -p /etc/rabbitmq/conf.d
cat > /etc/rabbitmq/conf.d/20-credentials.conf <<CONF
default_user = messenger
default_pass = ${PASS}
default_vhost = messenger
default_permissions.configure = .*
default_permissions.read = .*
default_permissions.write = .*
CONF
exec docker-entrypoint.sh rabbitmq-server
+10
View File
@@ -0,0 +1,10 @@
# Durable broker for the attachment pipeline (see REPORT.md).
loopback_users.guest = true
listeners.tcp.default = 5672
# A delivery not acked for 10 min is returned to the queue (worker hang guard on the broker side;
# the application lease in PostgreSQL detects a hung job much earlier).
consumer_timeout = 600000
# Refuse publishes before the disk fills up (publisher sees the block and the outbox keeps the jobs).
disk_free_limit.absolute = 200MB
vm_memory_high_watermark.relative = 0.6
log.console.level = warning