This commit introduces the OpenTelementryAttributes class that fetches
OTEL_RESOURCE_ATTRIBUTES and OTEL_SERVICE_NAME environment variables
and merges it with user-defined resource attributes.
Besides that, this commit includes spec-compliant proper handling of
OTEL_RESOURCE_ATTRIBUTES in OtlpMetricsPropertiesConfigAdapter and
OpenTelemetryAutoConfiguration.
See gh-44394
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
Previously, when Actuator expected to find multiple beans of the same
type, it used Map<String, Type> to inject them. Unfortunately, this
does not include beans that are not default candidates and there's
no way to request that autowiring includes such beans with Map-based
injection.
This commit switches from Map-based injection to querying the bean
factory for the desired beans. This is done using
SimpleAutowireCandidateResolver's new helper method,
resolveAutowireCandidates, that returns a Map<String, Type> of
beans including those that are not default candidates but excluding
those that are not autowire candidates.
Closes gh-43481
Prior to this commit, the Micrometer instrumentation support would
auto-configure a `ServerHttpObservationFilter` for creating observations
in Spring MVC applications.
As of Spring Framework 6.2, applications can extend this filter class to
get notified of the observation scope being opened.
This commit contributes a new `TraceHeaderObservationFilter`
implementation that writes the current Trace Id (if present) to the
`X-Trace-Id` HTTP response header.
This feature is disabled by default, applications will need to enable
`management.observations.http.server.requests.write-trace-header`.
`
Closes gh-40857
Previously, when health probes were enabled, the post-processor of
AutoConfiguredHealthEndpointGroups resulted in the bean no longer
implementing AdditionalPathMapper. This then caused a
ClassCastException when working with AdditionalPathMapper beans
in EndpointRequest's additional path mapping support.
This commit updates the type returned by the post-processor to
implement both HealthEndpointGroups and AdditionalPathMapper, as
AutoConfiguredHealthEndpointGroups does. Its implementation of
getAdditionalPaths produces a result that combines both the
additional paths of the original HealthEndpointGroups bean and its
own additional paths for the probes.
Fixes gh-44052
Previously, customization was performed in two places:
1. By customizers defined in the reactive and servlet web servlet
factory auto-configuration
- ServletWebServerFactoryAutoConfiguration
- ReactiveWebServerFactoryAutoConfiguration
2. By a ManagementWebServerFactoryCustomizer that delegates to
customizers of certain types found in the application context
hierarchy.
This led to some double customization as the customizers registered
by the auto-configuration classes were also found and called by the
ManagementWebServerFactoryCustomizer.
Additionally, the ManagementWebServerFactoryCustomizer would find
customizers from the parent context registered by
EmbeddedWebServerFactoryCustomizerAutoConfiguration.
This commit reworks the customization of the management web server
factory to remove the double customization.
ManagementWebServerFactoryCustomizer no longer delegates to
customizers that it finds in the context hierarchy. This
prevents the customizers defined in the reactive and servlet web
server factory auto-configuration classes from being called twice.
Additionally, EmbeddedWebServerFactoryCustomizerAutoConfiguration is
now registered in the child context so that its customizers continue
to be called when preparing the management context web server
factory.
Closes gh-44151
Add new methods to `QuartzEndpoint` and `QuartzEndpointWebExtension`
to allow a Quartz job to be triggered on demand.
See gh-43086
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>