TODO: mcd-tracker API observability — Prometheus instrumentation + business metrics
mcd-tracker API observability
What
Replace the stub
/metrics endpoint (hardcoded up 1) with real Prometheus instrumentation. Copy the pal-e-docs pattern exactly.Scope
- Add
prometheus-fastapi-instrumentatorto dependencies - Wire in
main.py— auto-instruments all endpoints (request rate, latency histograms, error rates by status code) - Remove manual
/metricsstub inroutes/health.py— the instrumentator handles it - Add custom business counters in route handlers:
- Existing ServiceMonitor already scrapes
/metricson port 8000 every 30s — no deployment changes needed
Pattern to follow
pal-e-docs/src/pal_e_docs/main.py lines 60-63:
Depends on
Nothing. Can start immediately.