docs(): added RUNBOOK, compliance matrix, ADR, refactored C4 and

repository map

zavoz
This commit is contained in:
ITQ
2026-02-24 13:17:24 +03:00
parent 7bf3ccee5c
commit 740fd2d7bd
18 changed files with 542 additions and 10 deletions
+34
View File
@@ -0,0 +1,34 @@
# 6. Эксплуатация и наблюдаемость
## Endpoints
- `/health` -> liveness (`health_check.Memory`).
- `/ready` -> readiness (`Cache`, `Database`, `Storage`, `Celery Ping`).
- `/metrics` -> Prometheus metrics.
SLA `ready <= 180s` подтверждается только live-demo.
## Метрики и логи
- Инфраструктурные метрики через `django-prometheus` middleware.
- Бизнес-счётчики: `lotty_decide_requests_total`, `lotty_events_ingested_total`.
- Production logs: JSON + `Correlation-ID` (`django-guid`).
## Celery задачи
Периодические:
- `guardrails.check_all` - 60s.
- `notifications.flush_pending` - 30s.
- `events.cleanup_expired_pending` - 3600s.
По запросу:
- `events.persist_decision` - асинхронная запись `Decision` при `DECISION_WRITE_MODE=async`.
## Runtime knobs
- `DECISION_RESULT_CACHE_TTL_SECONDS` (по умолчанию `60`).
- `DECISION_WRITE_MODE` (`sync|async|disabled`, по умолчанию `sync`).
## Команды
`cd src/backend && just run|test|test-coverage|lint|format`