For each request, Omni Gateway resolves the correlation ID as follows:
-
Request includes the header: The correlation ID is the value the client sent. Omni Gateway doesn’t apply the generation expression.
-
Request doesn’t include the header: The correlation ID is a new value generated by the generation expression, different for each request. Omni Gateway adds the header to the request.
-
Request includes the header with an empty value: Omni Gateway treats the header as missing and generates a value.
-
Request includes the header more than once: The correlation ID is the first value. Omni Gateway forwards all values as received.
Omni Gateway never removes a header that the client sends.
For example, a request with the header baggage: userId=1,correlation.id=stale and the correlation ID REQ-1234 reaches the upstream service with the header baggage: userId=1,correlation.id=REQ-1234.
If you defined a tracing label named correlation.id, Omni Gateway ignores that label and logs a warning. The correlation.id span attribute always contains the correlation ID.