TODO: mcd-tracker API observability — Prometheus instrumentation + business metrics

todo-mcd-observability-api Doc

open todo

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-instrumentator to dependencies
  • Wire in main.py — auto-instruments all endpoints (request rate, latency histograms, error rates by status code)
  • Remove manual /metrics stub in routes/health.py — the instrumentator handles it
  • Add custom business counters in route handlers:
  • Existing ServiceMonitor already scrapes /metrics on 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.