Monitoring stack, containers and dashboards
CI / lint (push) Successful in 9s
CI / test (push) Successful in 36s
CI / notify (push) Successful in 5s

- API image (uv multi-stage, non-root, gunicorn, migrations on start,
  health check) and UI image (nginx, CSP, config.js rendered from
  API_BASE_URL); /healthz documented in OpenAPI
- docker compose runs db, api and ui; the "monitoring" profile adds
  Prometheus, postgres-exporter and Grafana, all provisioned from files
- Grafana dashboards: API overview (RED), Last.fm API, Usage, Database
- Prometheus alert rules: API down, error rate, latency, auth failure
  spike, ignored scrobbles, DB pool saturation, Postgres down
- Pool checkout gauge counts events (the pool's own counters lag the
  checkin event); error ratios show 0 instead of "No data"
- Tests check dashboards and alerts only use metrics that exist
- scripts/generate_traffic.py drives realistic traffic for demos

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MK52BGoJbPhZ1vSFuKcGUW
This commit is contained in:
mattandClaude Opus 5.5 committed 2026-09-25 14:26:19 +01:00
1 parent faa74871a5
commit ea705589f1
28 files changed
+3508 -14

No files matched your search

Generated
+2
View File
@@ -846,6 +846,7 @@ dev = [
{ name = "openapi-spec-validator" },
{ name = "pylast" },
{ name = "pytest" },
{ name = "pyyaml" },
{ name = "ruff" },
]
@@ -867,6 +868,7 @@ dev = [
{ name = "openapi-spec-validator", specifier = ">=0.9.0" },
{ name = "pylast", specifier = ">=7.1.0" },
{ name = "pytest", specifier = ">=9.1.1" },
{ name = "pyyaml", specifier = ">=6.0.3" },
{ name = "ruff", specifier = ">=0.16.9" },
]