You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to improve logging for WebFlux requests, as part of #21437, e.g. to avoid duplicate information (e.g. request path) being logged multiple times, log messages for a given request need to insert a common log id, so that the messages can be correlated regardless of the thread id.
This can be done be exposing a well-known request attribute via ServerWebExchange and a convenience method on ServerWebExchange to access it.
Perhaps what makes more sense then is to have ServerHttpRequest#getRequestId() or just getId() which would come from the underlying channel or connection if possible (Reactor Netty, Undertow) but otherwise, if that's not available, could be something like the identity hashcode of the ServletHttpRequest.
Rossen Stoyanchev opened SPR-16966 and commented
In order to improve logging for WebFlux requests, as part of #21437, e.g. to avoid duplicate information (e.g. request path) being logged multiple times, log messages for a given request need to insert a common log id, so that the messages can be correlated regardless of the thread id.
This can be done be exposing a well-known request attribute via
ServerWebExchange
and a convenience method onServerWebExchange
to access it.Affects: 5.0.7
This issue is a sub-task of #21485
Issue Links:
Referenced from: commits bc3cf0e, 39d5874, 5dc49b1, fd90b73, 8231066, 5cdc267
The text was updated successfully, but these errors were encountered: