Concept Flow - Request ID for tracing
Incoming HTTP Request
Middleware: Check for existing Request ID
Use existing
Attach Request ID to request object
Pass request to next middleware/handler
Use Request ID in logs and responses
Send response back to client
When a request comes in, middleware checks if it has a Request ID. If not, it creates one, attaches it to the request, and passes it along for consistent tracing.