Prior to this commit, the `ClientObservationConventionAdapter` would
overwrite a request builder attribute. This would happen when the
request is not fully built when the observation starts. At that point,
the tags are built for long task timers, but not for the actual metric.
This effectively overrides the correct value of the URI template in the
builder.
This commit removes this builder update which was invalid in the first
place.
Fixes gh-40330
This commit moves the "micrometer.observations.*" configuration
properties to "management.observations.*" namespace, as it was
introduced in the wrong namespace initially.
The former configuration property is deprecated and will be removed in a
future version.
Fixes gh-39600
Prior to this commit, the Micrometer annotations support (`@Timed`,
`@Counted`...) was guarded by the presence of both Micrometer and
AspectJ on the classpath.
This signal is too weak, considering the startup performance impact and
the fact that the AspectJ dependency can be brought transitively in many
cases.
This commit adds a new `micrometer.observations.annotations.enabled`
property that is set to `false` by default to only process the
annotations support when this property is enabled.
Fixes gh-39128
This is a follow-on from afad358 and ensures that the auto-configured
security for Actuator in a WebFlux app has an authentication manager
to back its use of HTTP basic and form login.
Fixes gh-39069
This auto-configuration ensures, if Micrometer Tracing is on the
classpath, that there is always a tracer. It backs off if there is
already a tracer, for example contributed by the Brave or the Otel
auto-configurations, which are run before.
See gh-38568
Prior to this commit, we set in gh-37388 the ObservationRegistry on the
auto-configured JmsTemplate bean. This enables observations and context
propagation when sending JMS messages.
This commit applies the same to the `DefaultJmsListenerContainerFactory`
and the `DefaultJmsListenerContainerFactoryConfigurer`, in order to
enable observations on `@JmsListener` annotated methods.
This commit also refactors the support implemented in gh-37388 to avoid
relying on a bean post processor and instead set the observation
registry directly in the main auto-configuration: while Micrometer core
is an actuator-only dependency, Micrometer Observation API is a compile
dependnecy for spring-jms itself and there is no need to separate
concerns there.
Fixes gh-38613
Previously, the child management context was created when the
parent context's web server was initialized and it wasn't stopped
or closed until the parent context was closed. This resulted in
the child context being left running when the parent context was
stopped. This would then cause a failure when the parent context
was started again as another web server initialized event would be
received and a second child management context would be started.
This commit updates the initialization of the child management
context to integrate it with the lifecycle of the parent context.
The management context is now created the first time the parent
context is started. It is stopped when the parent context is
stopped and restarted if the parent context is started again.
This lifecycle management is done using a phase that ensures
that the child context is not started until the parent context's
web server has been started.
Fixes gh-38502