I want to add a logging middleware to my FastAPI app. Log every request and
response with: method, path, status, latency, a correlation ID, and redact
auth headers. Structured JSON output. Before you write any code, ask codex
for a second opinion on the design — specifically: async vs sync middleware,
how to propagate the correlation ID through downstream async tasks, and
what the cleanest redaction point is. Then reconcile and implement.
Created
April 19, 2026 19:22
-
-
Save ehzawad/0678479263ffa05fee86ad7a2cb8363a to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment