-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Inconsistent http.route tracing attribute value between RestTemplate & WebClient since 6.1.2 #32202
Comments
Spring framework 6.3.x does not exist. Can you elaborate in which version this behavior appeared and how it was behaving before? |
@bclozel oh sorry, I've changed the title. All these issues relate to the same test on our side. In the 2 issues I linked, we failed to mention that this inconsistency between restTemplate and webClient makes things awkward, so that is what this issue is about. Also updated the original post to reflect exactly what we're asserting. |
Hello @wleese I had another look to this issue and unfortunately I don't think we can change this. You're right that this change of behavior is due to #31882 and #32003 and I think they're valid. On the other hand, the same feature in In Spring Framework, In Spring Framework, Unfortunately, this base URI information is lost during the expansion and it's too late to get it for the If consistency is very important for you in the short term, you can use a custom ObservationFilter that processes the http.route keyvalue and removes the host part to revert this behavior. I'm closing this issue now as I don't see any way to fix this without causing other, more important regressions. |
Thanks for the elaborate explanation. We'll make it consistent on our end. |
In 2 tests, one using restTemplate and the other webClient, the tracing attribute
http.route
has differing values.ClientRequestObservationContext
This not only requires multiple test paths (webmvc leads to a different value than webflux), but also leads to an inconsistent experience when using tracing data (raw data, or using a UI). When using tracing data, one now has to consider if webClient or restTemplate was used, which may be unreasonable if not familiar with the relevant application(s).
The text was updated successfully, but these errors were encountered: