Migrate `WebMvcTags` to `ServerRequestObservationConvention`
What problem are you trying to solve?
WebMvcTags was deprecated in 3.0, for removal in 3.2 in favor of ServerRequestObservationConvention. The 3.0 release notes merely mention:
RestTemplateExchangeTagsProvider, WebClientExchangeTagsProvider, WebFluxTagsProvider, WebMvcTagsProvider and related classes have been replaced with ObservationConvention equivalents.
The before/after of this change is still a bit unclear to me; hoping someone can provide additional samples of how this API was used, and how the replacements should look in 3.2+.
Hi @timtebeek
I could find some more information on this topic
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-3.0-Migration-Guide#tag-providers-and-contributors-migration
Hope this helps. I will further explore on it.
Thanks, Mahi
Thanks for the helpful link @bsmahi ; looks quite involved at first glance, especially as the methods in DefaultServerRequestObservationConvention are non static, whereas WebMvcTags did have static methods. That might complicate a migration, automated or manual.
- Fixed in https://github.com/openrewrite/rewrite-spring/pull/586
Hi all,I'm currently migrating to springboot 3.2.9 and found webmvtags was depreacted I'm using this methods. webmvctags.method(request), webmvctags.exception(exception) webmvctgas.uri(request ,response). I ran the recipe but changes didn't get reflected.Can i k kw the replacement was on the same boat from few days.TIA
@Swachithreddy Those individual methods weren't taken into account, the merged PR merely does a high level migration of the WebMvcTagsProvider implementation to ServerRequestObservationConvention.
Would you be open to making this addition, or logging it as an issue?