spring-cloud-sleuth
spring-cloud-sleuth copied to clipboard
Trace are not being injected in netty error logs
When an error in thrown the trace are not being injected in netty error logs.
Expected Behavior
Traces should be injected in error logs.
Actual Behavior
Traces are not being injected.
Your Environment
java: 17 spring-boot: 2.7.2 spring-boot-starter-webflux using reactor netty http 1.0.21 spring-cloud-starter-sleuth: 3.1.3
I see the same behaviour if using DECORATE_QUEUES, but using DECORATE_ON_EACH as the Reactor Instrumentation type preserved the trace id.
@samueldlightfoot DECORATE_QUEUES seems to not pass the traces when using flatMap DECORATE_ON_EACH will. But it seems in any case that the trace are not passed to the error log of the webClient which make it very complicate to hunt down the error afterward.
I would suggest using DECORATE_ON_EACH
. Of course it means a big performance drop but it should work most of the time. Sleuth and Reactor instrumentation works most of the time - most likely you found a problematic spot where it doesn't work well. Have you tried the latest snapshots of sleuth?
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.