forked from mtusi2026/mtusi2026lab6
Переиспользован стек lab5. API/worker шлют OTLP (traces/metrics/logs) в otel-collector -> Prometheus/Loki/Tempo; Grafana с provisioning датасорсов, дашборда и alert rules в Git. W3C trace context переносится через поле traceparent в задании очереди (API producer span -> worker consumer span в одном trace, подтверждено прямым запросом к Tempo). Три контролируемых инцидента прогнаны и задокументированы (worker down -> queue lag + alert, DB down отличим от медленного handler по error-span, telemetry backend down не роняет API/Collector). В процессе найдены и исправлены 4 реальных бага (middleware после старта приложения, detached span context, замерзающая метрика очереди при падении её единственного источника, неатомарный XACK+XDEL) — см. REPORT.md и evidence/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
17 lines
1.0 KiB
Plaintext
17 lines
1.0 KiB
Plaintext
=== Incident 3: telemetry backend (Prometheus+Loki+Tempo) down ===
|
|
--- API still serving business traffic with telemetry backends down ---
|
|
python3 tests/smoke.py --base-url "http://localhost:8080"
|
|
PASS: lab6 public API scenario; infrastructure and grading evidence remain separate.
|
|
--- collector memory after backend outage (should stay bounded, not grow unbounded) ---
|
|
mtusi2026lab6-otel-collector-1 94.42MiB / 200MiB
|
|
|
|
Collector logs during outage: repeated "Exporting failed. Will retry the
|
|
request after interval." for both otlphttp/tempo and otlphttp/loki exporters,
|
|
with increasing backoff intervals (4.1s, 6.4s, 7.5s, 9.8s...) -- default
|
|
retry_sender exponential backoff. Collector process stayed up throughout
|
|
(not restarted), memory stayed at 94MiB/200MiB limit (well under the
|
|
memory_limiter's 150MiB internal threshold), so buffered-but-unsent spans/
|
|
logs/metrics did not grow memory without bound. Prometheus scraping also
|
|
simply failed silently (its own container was down) with no effect on the
|
|
Collector or the API.
|