Update `ReporterConfiguration` so that `spanReporter` back off
if a `Reporter` bean is defined. Prior to this commit, only
`AsyncReporter` beans would be considered.
See gh-35455
Brave has a feature called joint spans that was enabled by default with
Spring Cloud Sleuth (and Boot 2.x). This has changed with
Micrometer Tracing and Boot 3.x. In order to make migration simpler,
joint spans should be set through a property.
This is a Brave+B3-only feature, W3C is not supported by Brave and
OTel does not have this capability.
See gh-35165
Update Tomcat, Jetty, Undertow and Netty servers so that an SslBundle
is used to apply SSL configuration. Existing `Ssl` properties are
internally adapted to an `SslBundle` using the `WebServerSslBundle`
class. Additionally, if `Ssl.getBundle()` returns a non-null value the
the `SslBundles` bean will be used to find a registered bundle by name.
See gh-34814
Update the auto-configuration gradle plugin so that the
configuration-properties plugin is not longer automatically applied.
This allows us to have auto-configuration modules that don't ship
configuration properties.
Closes gh-35028
Update Zipkin auto-configuration so that `ZipkinConnectionDetails`
beans may be optionally used to provide connection details.
See gh-34657
Co-Authored-By: Mortitz Halbritter <mkammerer@vmware.com>
Co-Authored-By: Phillip Webb <pwebb@vmware.com>
Add `management.wavefront.application.custom-tags` property which
populates custom tags in `ApplicationTags` created by
`WavefrontAutoConfiguration`.
See gh-34223
Signed-off-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
Micrometer Tracing comes with 3 generic interfaces, SpanExportingPredicate,
SpanReporter and SpanFilter, thanks to which you can decide whether you
want to export a span, how you want to report it and how to mutate it
regardless of which tracer library you are using.
Without this change usage of these 3 interfaces is not possible
for OpenTelemetry.
With this change we're putting all SpanExporters to the
CompositeSpanExporter and apply the exporters only after predicates,
filtering and reporting took place.
See gh-34002
Refine the recently introduced `EndpointRequest` matcher `toString()`
to use lower-case item names. Also applied the same logic to the
reactive variant.
See gh-33690
This commit declares an `@Order` for the `ServerHttpObservationFilter`
bean declaration in the Observation WebFlux auto-configuration.
This allows developers to consistently order other `WebFilter` instances
relatively to this one. Here, `@Order(Ordered.HIGHEST_PRECEDENCE + 1)`
has been chosen to align with the order of its MVC counterpart.
Fixes gh-33444
As of spring-projects/spring-graphql#547, Spring GraphQL introduced a
`PropagationWebGraphQlInterceptor` that propagates the incoming tracing
information in HTTP request headers into the GraphQL context.
This commit auto-configures the propagation interceptor if the
application exposes a GraphQL HTTP endpoint and if it is configured for
Tracing support.
Fixes gh-33542
Prior to this commit, the `ClientObservationConventionAdapter` would
fail with an `IllegalArgumentException` when the observation is first
started: at this point, the carrier (the request builder here) is
present, but the full request not yet fully built.
This commit ensures that the convention adapter uses the request and, if
not available, the request builder to adapt to the
`WebClientExchangeTagsProvider`.
Fixes gh-33483
Prior to this commit, we would advise developers, as migration path from
Spring Boot 2.0-x metrics, to create `GlobalObservationConvention` beans
for the observations they want to customize (observation name or key
values).
`GlobalObservationConvention` are currently applied **in addition** to
the chosen convention in some cases, so this does not work well with
this migration path.
Instead, instrumentations always provide a default convention but also a
way to configure a custom convention for their observations. Spring Boot
should inject custom convention beans in the relevant
auto-configurations.
Fixes gh-33285
Relocate `ApplicationTags` `@Bean` method from
`WavefrontTracingAutoConfiguration` to `WavefrontAutoConfiguration`
since it is now shared between tracing and metrics.
The `application-name`, `service-name`, `cluster-name` and `shard-name`
have also been relocated from `management.wavefront.tracing` to
`management.wavefront`.
Fixes gh-33244
Update `application-name` and `service-name` `management.wavefront`
properties to align with Spring Boot 2.x support. The properties now
use the wavefront terminology where `application` refers to an a
collection of (micro)`services`.
This commit also adds `cluster-name` and `shard-name` properties that
can be used to add additional items to the `ApplicationTags`.
See gh-32844
Update `ManagementContextFactory` implementations to create an
appropriate `Environment` type and to apply the `ConversionService`
from the parent context.
Prior to this commit, the management context `Environment` would not
be able to convert values from a `configtree:` source due to a missing
converter.
Fixes gh-32941
Returning a private class from a package-private method causes the
AOT-generated source files to fail to compile as the private class is
not visible.
Closes gh-33106
Update `MeterRegistryPostProcessor` to configure `MeterRegistry` beans
in two distinct sweeps. The first sweep applies customizers and filters
as the `MeterRegistry` bean is initialized, the second sweep applies
`MeterBinder` beans once all singletons have been instantiated.
Prior to this commit, it was not possible for a `MeterBinder` bean to
directly or indirectly use a `MeterRegistry`. It was also possible for
bound meters to cause a deadlock during refresh processing if those
meters could be updated on a thread other than main, such as GC
notifications.
Fixes gh-30636
Fixes gh-33070
Update types returned from endpoints to implement the
`OperationResponseBody` interface. This ensures that they will be
serialized using the isolated actuator `ObjectMapper`.
See gh-20291
Add `OperationResponseBody` tagging interface that can be used
to trigger the use of an isolated ObjectMapper specifically for
actuator responses.
The isolated mapper is provided by an `EndpointObjectMapper`
bean which is auto-configured unless specifically disabled
by the user.
WebMVC, WebFlux and Jersey integrations have been updated
to provide a link between the `OperationResponseBody` type
and the endpoint `ObjectMapper`.
See gh-20291
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>
Without this change we're missing the BaggageTextMapPropagator for
OTel. This means that we're not propagating remote-fields
(only baggage via the 'baggage' field).
With this change we're adding the missing propagator as
THE LAST entry in the composite TextMapPropagator. It has to be
last cause with the latest Snapshots of Micrometer Tracing it
will append the remote field baggage to existing baggage in the
context extracted via the W3CBaggagePropagator.
See gh-32898
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
This commits adds a checkstyle rule to not use List.of(), Set.of()
and Map.of(), preferring Collections.emptyList(), emptySet(), and
emptyMap() respectively.
It replaces usages of these methods across the codebase.
See gh-32655