cf-java-logging-support icon indicating copy to clipboard operation
cf-java-logging-support copied to clipboard

Add support for HTTP header x-correlation-id

Open KarstenSchnitter opened this issue 11 months ago • 0 comments

The request instrumentation creates a correlation id. This used to look into the HTTP headers x-CorrelationID and x-vcap-request-id. This new implementation additionally looks into x-correlation-id with priority between the two other headers.

The downside of this change is, that it might not be aligned with the Gorouter logs. The Gorouter might log either HTTP header x-CorrelationID and/or x-correlation-id. But it will always create an x-vcap-request-id which is seen by the application. This might create deviations in log parsing for correlation ids, when the newly supported header is used.

KarstenSchnitter avatar Jan 28 '25 08:01 KarstenSchnitter