Context
Review comment on PR #48 flagged that request logging () is awaited inline in many branches of , which adds synchronous database latency to API responses.
Proposed changes
- Move request-log writes to an async background path (e.g., spawn task or bounded worker queue).
- Keep failure handling resilient: never block/impact user-facing success path if logging fails.
- Preserve existing request metadata (request id, status, provider, route, latency, error_code).
- Add retry or bounded queue behavior to avoid unbounded task growth.
Acceptance Criteria
Notes
Related comments are in PR #48: high-priority suggestion around blocking DB writes in handler flow.
Context
Review comment on PR #48 flagged that request logging () is awaited inline in many branches of , which adds synchronous database latency to API responses.
Proposed changes
Acceptance Criteria
Notes
Related comments are in PR #48: high-priority suggestion around blocking DB writes in handler flow.