The Missing Request Trace
#incident-response — 4 hours debugging a missing email
Sarah (user_id=8291): order placed, payment charged, inventory deducted — no confirmation email. Five services, five log formats, no shared identifier. Marcus is grep-ing timestamps manually.
The trap: each service logs independently — no way to trace one request across the system.
Your task
Implement correlation ID propagation in `correlation_tracing.py`: generate at the gateway, set ContextVar, forward X-Correlation-ID on every hop, return it in response headers.
Book: log by service · Prod: one grep across all services — 30 seconds vs 4 hours.
Skills you'll prove
Interview Tip
When asked how you debug requests across microservices, say: "Every request gets a correlation ID at the edge — usually an X-Correlation-ID header. That ID is passed to every downstream call and included in every log line. When support reports a failure, you grep one value across all services and see the full request path in seconds instead of manually matching timestamps for hours. I've lived through 4-hour debugging sessions that became 30-second searches once we added correlation ID propagation."