Skip to content

Missing path pattern in Spring Framework 6 web Observability support #2212

@bclozel

Description

@bclozel

As of Spring Boot 3.0, the Micrometer metrics support has been deprecated/removed in favor of broader observability support in Spring projects directly. In the case of Spring MVC and Spring WebFlux, specific filters (like ServerHttpObservationFilter) were created in Spring Framework 6.0.

The filters have been implemented in a generic fashion and do not rely on web frameworks specifics. This means that instead of looking into web frameworks internals to know which mapping pattern matched the incoming request, the framework itself needs to provide this information.

More concretely, in Spring Boot 2.x, WebMvcTags and WebFluxTags needed to know about Spring Data REST internals to pick up the matching pattern. With the new infrastructure, things should be done the other way around: Spring Data REST should get the current observation, if present, and set the matching path like this. I guess this should be done in RepositoryRestHandlerMapping and the reactive variant as well?

Sorry for not noticing this before, this has been reported in spring-projects/spring-boot#33673

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions