The in-memory metrics system covered one gunicorn process at a time, was lost on restart and was never used. Remove /admin/metrics-dashboard, /admin/metrics, starpunk/monitoring, the HTTP/query timing, memory monitor, feed counters, METRICS_* settings and psutil. Keep /health, /admin/health (without its metrics block), pool stats and the feed cache. ADR-072. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1.4 KiB
1.4 KiB
v2.12.0: Remove the metrics dashboard
Decision: ADR-072.
Removed
| What | Where |
|---|---|
| Metrics buffer, HTTP middleware, database timing wrapper, memory monitor, business metrics | starpunk/monitoring/ (deleted) |
| HTTP middleware and memory monitor start-up | starpunk/__init__.py |
MonitoredConnection wrapping, slow_query_threshold and metrics_enabled arguments |
starpunk/database/pool.py |
track_feed_generated calls and their timing code |
starpunk/feeds/atom.py, json_feed.py, rss.py |
/admin/metrics-dashboard, /admin/metrics, transform_metrics_for_template, the metrics block of /admin/health |
starpunk/routes/admin.py |
| Dashboard template and the admin nav link | templates/admin/metrics_dashboard.html, templates/admin/base.html |
METRICS_ENABLED, METRICS_SLOW_QUERY_THRESHOLD, METRICS_SAMPLING_RATE, METRICS_BUFFER_SIZE, METRICS_MEMORY_INTERVAL |
starpunk/config.py, .env.example |
psutil |
requirements.txt |
| Tests | tests/test_monitoring.py, tests/test_monitoring_feed_statistics.py, tests/test_admin_feed_statistics.py |
Kept
/health, /health?detailed=true, /admin/health (database, pool,
filesystem, disk), pool statistics, the feed cache and its own hit/miss
counters, and correlation IDs in logs.
Upgrade
No migration. METRICS_* variables can be deleted from the environment;
they are ignored if left.