Problem
There is no database query profiling, no health endpoints, and no structured logging that correlates the lines emitted during a single request. This makes debugging and production operations harder.
Proposal
An observability bundle (may be split into sub-issues):
- Query log / profiler — capture query count, per-query timing, and a slow-query flag, exposed as a data source the debugbar can render.
- Health checks — a
/health endpoint (liveness + readiness) backed by a registry of pluggable dependency checks (database, cache, queue, storage).
- Structured logging — a JSON log formatter and a per-request correlation id propagated through the logger.
Scope
ORM query hooks, debugbar data source, health-check registry + endpoint, JSON formatter + correlation middleware.
Definition of Done
Problem
There is no database query profiling, no health endpoints, and no structured logging that correlates the lines emitted during a single request. This makes debugging and production operations harder.
Proposal
An observability bundle (may be split into sub-issues):
/healthendpoint (liveness + readiness) backed by a registry of pluggable dependency checks (database, cache, queue, storage).Scope
ORM query hooks, debugbar data source, health-check registry + endpoint, JSON formatter + correlation middleware.
Definition of Done
pytestcovers the query recorder, health registry, and JSON/correlation output (suite green).