New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No tracing context when processing ClientResponse body #31817
Comments
I'm closing this issue for now. If you still think there is a bug, a sample project showing the actual use case and explaining what behavior is expected would be useful. |
Sample project As You see on below screen, when processing response body stream, tracing is lost. We wiretap on response body (Flux<DataBuffer>) for generic logging purpose. Similarly, we wiretap on request body but there is no problem with tracing. |
Even more obvious case with Flux. Code: In this case tracing context is missing also later in the chain, when processing already decoded element. |
In summary, I believe that restoring threadLocal failed in these cases. |
I've been having a look and I'm not sure at this stage if this is a bug in Spring Framework, in Reactor or an expected behavior given the decoder setup. I'm seeing that the context is not being established in the |
After chatting with the reactor team (thanks a lot @chemicL !), this is actually another instance of #30273. This is a complex issue that was fixed in Reactor 3.6 (see the dedicated reactor announcement blog post). I've upgraded your sample to Spring Boot 3.2 and it all works fine. This is a major feature in Reactor and will not be backported to previous generations. I'm closing this issue as a result. Thanks for the report! |
Thank you for your time and help! And sorry for incomplete description at first. |
When processing ClientResponse body, tracing context is missing.
One of many way to reproduce it:
Environment:
The text was updated successfully, but these errors were encountered: