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
I have noticed that when using WebClient metrics with the built-in convention for adapting WebClientExchangeTagsProvider that the URI template is being stripped from the attributes of the ClientRequest. This is caused by the ClientObservationConventionAdapter trying to overwrite the attribute to ClientRequestObservationContext.getUriTemplate() before ClientRequestObservationContext.setUriTemplate(String) has been called.
I have worked around this by providing my own adapter convention which avoids overwriting the request attribute. Given this adapter convention has already been removed from Spring Boot 3.2 it might not be worth addressing, but I thought I would report it.
The text was updated successfully, but these errors were encountered:
Spring Boot 3.1.x is almost out of OSS supported, scheduled in roughly a month (2024-05-18). While I do see similarities and inconsistencies (see spring-projects/spring-framework#29885), I believe this behavior has been this way for a long time now and I don't think we should change this right before cutting the OSS support. This is likely to break existing dashboards - arguably, they will break anyway when applications will move to the observation conventions in 3.2.x, since this adapter has been removed in that generation.
HaloFour
changed the title
WebClient request contributes full URI to meter tag when using
WebClient request contributes full URI to meter tag when using WebClientExchangeTagsProvider
Apr 12, 2024
bclozel
changed the title
WebClient request contributes full URI to meter tag when using WebClientExchangeTagsProvider
ClientObservationConventionAdapter overwrites WebClient request attributes
Apr 12, 2024
I've had another look and it's definitely invalid behavior. I'm pushing a fix for 3.1.x as the existing implementation only breaks expectations. Thanks for your report!
Spring Boot version: 3.0.13
I have noticed that when using WebClient metrics with the built-in convention for adapting
WebClientExchangeTagsProvider
that the URI template is being stripped from the attributes of theClientRequest
. This is caused by theClientObservationConventionAdapter
trying to overwrite the attribute toClientRequestObservationContext.getUriTemplate()
beforeClientRequestObservationContext.setUriTemplate(String)
has been called.Reproduction:
I have worked around this by providing my own adapter convention which avoids overwriting the request attribute. Given this adapter convention has already been removed from Spring Boot 3.2 it might not be worth addressing, but I thought I would report it.
The text was updated successfully, but these errors were encountered: