Unfortunately there's no good way to configure connect and read timeout
separately, which works for all supported reactive clients. This
implementation applies a timeout through Reactor's timeout method. The
timeout from the properties is summed together and this is the applied
timeout. While not perfect, this is better than no timeout at all.
Closes gh-31496
Previously auto-configuration of a user details service (imperative
or reactive) would only back off on the presence of certain beans.
This led to situations where the im-memory service was
auto-configured and the default password was logged even though
another authentication mechanism was in use.
This commit updates the auto-configuration so that it backs off
when depending on Spring Security's OAuth2 Client and OAuth2
Resource Server modules. In the imperative case it will also back
off when depending on the SAML 2 provider.
Closes gh-35338
Spring Boot auto-configures both a `JmsTemplate` and a
`JmsMessagingTemplate`. As of Spring Framework 6.2, JMS has
observability support when publishing messages.
This commit creates a bean post-processor that configures an
`ObservationRegistry` on the template, if the registry is present.
Closes gh-37388
OTel has deprecated their semconv module and introduced a new module
with different Maven coordinates. micrometer-metrics/tracing#343 will
move Micrometer Tracing to the new module. Until then, we need to
suppress the deprecation warnings that result from using the old one.
Closes gh-37347
This commit removes the auto-configuration of the
`ServerHttpObservationFilter` bean for WebFlux applications as it's been
deprecated by Spring Framework.
The Observability instrumentation is now handled at the
`WebHttpHandlerBuilder` in Framework directly and doesn't need any
auto-configuration from Spring Boot.
Closes gh-37344
Micrometer introduced extended exemplars functionality that adds
exemplars to _count too not only to histogram buckets,
see: https://github.com/micrometer-metrics/micrometer/pull/3996
Because of this, some verifications should be changed.
The OpenTelemetry bean is now configured in the
OpenTelemetryAutoConfiguration. This method also applies
SdkLoggerProvider and SdkMeterProvider.
Additionally, the OpenTelemetry Resource is now a bean. Resource
attributes can now be configured through properties
The resourceAttributes in OtlpProperties have been deprecated in favor
of the new one in OpenTelemetryProperties.
Closes gh-36544
Closes gh-36545
The new ConnectionFactoryDecorator can be used to decorate the
ConnectionFactory built by the ConnectionFactoryBuilder.
The new R2dbcObservationAutoConfiguration configures a
ConnectionFactoryDecorator to attach a ObservationProxyExecutionListener
to ConnectionFactories. This enables Micrometer Observations for R2DBC
queries.
Closes gh-33768
OTel semantic conventions mandate certain resource attributes to present
on exported spans. This commits make sure that the attribute we add are
merged with the defaults, rather than replacing them.
See gh-36155
Micrometer added a new configuration option to its OTLP registry to
enable configuring the base time unit. These changes provide a
configuration property to support to it.
See gh-36393
This commit knowingly makes breaking API changes to
JerseyHealthEndpointAdditionalPathResourceFactory. We considered
other options but they all had the potential to be backwards
incompatible in one way or another. Faced with that situation we
concluded that the likelihood of anyone using the modified API
directly is small enough to warrant making the breaking changes.
If it becomes apparent that we have misjudged things we can revisit
the changes in the future.
Closes gh-36250
Add support for logging correlation IDs with Logback or Log4J2 whenever
Micrometer tracing is being used.
The `LoggingSystemProperties` class now accepts a defualt value resolver
which will be used whenever a value isn't in the environment. The
`AbstractLoggingSystem` provides a resolver that supports the
`logging.pattern.correlation` property and will return a value whenever
`LoggingSystem.EXPECT_CORRELATION_ID_PROPERTY` is set.
Using `LoggingSystem.EXPECT_CORRELATION_ID_PROPERTY` allows us to
provide a consistent width for the correlation ID, even when it's
missing from the MDC.
The exact correlation pattern returned will depend on the `LoggingSytem`
implementation. Currently Logback and Log4J2 are supported and both
make use of a custom converter which delegates to a new
`CorrelationIdFormatter` class.
Closes gh-33280
@ConditionalOnEnabledTracing is now applied to the minimal amount of
beans. The beans which are annotated with it are beans that will lead
to span sending to backends.
This leaves the majority of the Micrometer Tracing, Brave and
OpenTelemetry infrastructure untouched in tests.
Closes gh-35354
Most notably, this commit splits the tests that use Spring REST Docs
out into a separate task for which predictive test selection is
disabled. This allows it to be cached and use Gradle's built-in
up-to-date checking, thereby avoiding the generation of new snippets
and the need to then run the asciidoctor and asciidoctorPdf tasks.
It also updates spring-boot-smoke-test-junit-vintage to disable
predictive test selection so that we can continue to assert that
the some tests were executed.
See gh-35869
Setting 'management.observations.spring-security.enabled' installs an
ObservationPredicate, which prevents all observations starting with
'spring.security.' to be created.
Closes gh-34802
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