practice

Correlation ID

A single identifier attached to one logical operation and included in every log line it produces, anywhere in the system.

loggingtracingdebugging

The cheapest observability improvement available. Generate an ID at the edge, propagate it in a header through every call, put it in every log line, and return it to the client in the response and in error messages.

The payoff is immediate and large. A support ticket that quotes an error reference becomes a single query across all logs; an investigation that would have meant guessing at timestamps becomes a filter.

It is a prerequisite for tracing rather than a replacement for it — tracing needs the propagation to work anyway, and correlation IDs are the same propagation with far less infrastructure.