Rename `/actuator/httptrace` to `/actuator/httpexchanges` to better
describe its purpose and to remove confusion with distribute tracing.
This change also takes the opportunity to improve the code by making
the `HttpExchange` class (previously `HttpTrace`) fully immutable.
Closes gh-32885
Co-authored-by: Andy Wilkinson <wilkinsona@vmware.com>
Provide a workaround for spring-projects/spring-framework#29361 so
that multiple `@ImportRuntimeHints` can be used in a type hierarchy.
The commit should cover Actuator web endpoint use cases with the
exception of Cloud Foundry endpoints which are not possible due to
package access issues.
See gh-29361
Prior to this commit, Spring Boot would offer a specific Metrics
instrumentation for WebFlux applications through a `WebFilter` and
custom Tag providers.
As of Spring Framework 6.0, the Observation instrumentation is done
directly in WebFlux, also with a `WebFilter`. While this allows both
metrics and traces, some features cannot be supported in the same way
with this new infrastructure.
The former `WebFilter` has been removed and the Tagging infrastructure
deprecated in favor of custom Observation conventions. This commit
provides an adapter layer so that developers can refactor their custom
tagging solution to the convention way, during the deprecation phase,
without losing any feature.
Closes gh-32539
This commit migrates the existing metrics support (added in #29140) to
the new `Observation` instrumentation contributed in
spring-projects/spring-graphql#501.
We cannot have a smoother migration path here as the instrumentation
does not use the same context information for metadata extraction.
Closes gh-32794
This commit moves the entire Metrics auto-configuration for Spring MVC
to the new `Observation` API and the instrumentation contributed in
Spring Framework.
Closes gh-32538
Relocate `@ConstructorBinding` from the `boot.context.properties`
package to `boot.context.properties.bind` and update the
`DefaultBindConstructorProvider` to support it.
Closes gh-32660
Some of the types that are returned are hidden behind a
Map<String, Object> so the operation annotations already been marked
as reflective isn't sufficient.
This commit uses `@RegisterReflectionForBinding` to register the
types that are used as (nested) values in the response maps.
Closes gh-32486
As of spring-projects/spring-framework#28341, `WebClient` is
instrumented directly for `Observation`.
This commit removes the custom `ExchangeFilterFunction` that previously
instrumented the client for metrics.
As a result, the relevant tag providers are now deprecated and adapted
as `ObservationConvention` for the time being.
Closes gh-32518
Prior to this commit, Spring Boot would auto-configure a customizer that
instruments `RestTemplate` through a `RestTemplateBuilder`. This would
install a request interceptor that instrumented client exchanges for
producing metrics.
As of spring-projects/spring-framework#28341, the instrumentation is
done at the `RestTemplate` level directly using the `Observation` API.
The `Tag` (now `KeyValue`) extraction, observation name and
instrumentation behavior now lives in the Spring Framework project.
This commit updates the auto-configuration to switch from Boot-specific
Metrics instrumentation to a generic Observation instrumentation.
As a migration path, some configuration properties are deprecated in
favor of the new `management.observations.*` namespace.
Closes gh-32484