Перейти к содержанию

Observability Runbook

Метрики (Prometheus)

Endpoint: GET /metrics

Метрика Описание
http_requests_total Счётчик HTTP запросов
http_request_duration_seconds Latency histogram

Grafana

  • URL prod: http://<host>:3001
  • Dashboards: Overview, Game, Realtime, Bot (настроить вручную)

Алерты

См. infra/prometheus/alerts.yml:

  • HighErrorRate — 5xx > 1% за 5m
  • SlowActions — p95 > 500ms за 10m

Логи

JSON structured logging в stdout:

{"timestamp": "...", "level": "info", "service": "tabletime-api", "message": "..."}

Трейсинг

OpenTelemetry SDK подключён; экспорт в OTLP — настроить в prod.

Аудит

Таблица game_actions — immutable, retention 90 дней.