A user clicks Buy, and an order service finishes its work. Five seconds later, a shipping service wakes up—and something fails. A correlation ID is the breadcrumb shared across those related operations, so their records can be pieced together even when there is no single stack trace to follow. section 7.5.3 section 7.6.5
Generate a unique ID at the start of the request, then carry it through each handoff: API, database, event, queue, and consumer. Include the same ID in the relevant logs. Filtering by it turns a pile of unrelated messages into a request’s story across services. section 7.5.3
The ID is the thread, not the whole story: useful tracing also needs information about the services involved, their order, and the state passed between them. Centralized distributed tracing uses the shared ID to connect those details across network boundaries. section 12.6.1 section 7.9
[T+00s] [Producer] [ID: 8f42a...] Comment 'Your code smells' dropped in channel. [T+00s] [Producer] HTTP 200 OK returned to user. --------------------------------------------------- ( ... 3 seconds of awkward silence while GPU spins ... ) [T+03s] [AI Consumer] *Yawn* Waking up... [T+03s] [AI Consumer] [ID: 8f42a...] Oh look, a message! AI Inference starting... [T+03s] [AI Consumer] Analysis Complete: TOXICITY DETECTED! Banning User. [T+03s] [AI Consumer] ACK sent.
The producer and AI consumer show the same ID despite a three-second gap. The user receives a response before the consumer finishes. section 7.7.3
A practical check: confirm that both the producer and consumer logs display the same ID. If the ID disappears at a handoff, the breadcrumbs stop there. section 7.7.2 section 7.5.3







