Correlation id
Definition
A correlation id is an identifier generated for a request or business operation and propagated in headers and message metadata, then written into every related log entry.
In practice
When an error appears on every instance of a service, searching by correlation id shows the full story of one failing request across the gateway, services and queue consumers, and often reveals that the real failure is downstream. Return it to clients in a response header so support tickets can quote it.
With OpenTelemetry the trace id usually plays this role, which avoids two competing ids. Propagation has the same weak spots as tracing: queues, scheduled jobs and third-party calls need the id copied explicitly. Ids from clients should be validated or replaced, since they can be forged or huge.
Example
The gateway sets X-Request-ID: 7f3c9a1e on POST /orders; the order service, the payment service and the email worker all log request_id=7f3c9a1e, so one search shows the whole flow.