Commit Graph

2606 Commits

Author SHA1 Message Date
Moritz Halbritter 7fd29cf7c6 Polish "Add support for OpenTelemetry's service.namespace"
See gh-44499
2025-03-06 09:56:09 +01:00
Vanio Begic cf2353bdb3 Add support for OpenTelemetry's service.namespace
See gh-44499

Signed-off-by: Vanio Begic <vanio.begic123@gmail.com>
2025-03-06 09:46:11 +01:00
Moritz Halbritter 4dabf16a06 Polish "Remove default value for OtlpMetricsProperties.url"
See gh-44493
2025-03-06 09:36:33 +01:00
Johnny Lim 75f72b6ee7 Remove default value for OtlpMetricsProperties.url
See gh-44493

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-03-06 09:32:14 +01:00
Moritz Halbritter ea87b9114d Polish "Remove support for URLConnectionSender"
See gh-44500
2025-03-06 09:17:23 +01:00
Vanio Begic 336fdff9df Remove support for URLConnectionSender
See gh-44500

Signed-off-by: Vanio Begic <vanio.begic123@gmail.com>
2025-03-06 09:00:16 +01:00
Moritz Halbritter 272939e45e Polish "Refine the handling of OpenTelemetry resource attributes"
See gh-44494
2025-03-03 09:35:56 +01:00
Dmytro Nosan e62d78ab11 Refine the handling of OpenTelemetry resource attributes
See gh-44494

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-03-03 09:28:46 +01:00
Moritz Halbritter 8f4e0518f3 Polish "Add support for OTel-specific environment variables"
See gh-44394
2025-02-28 14:52:10 +01:00
Dmytro Nosan bf015bfeb9 Add support for OTel-specific environment variables
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>
2025-02-28 14:52:10 +01:00
Andy Wilkinson 51885c9d38 Remove deprecated management.otlp.metrics.export.resource-attributes
It was deprecated in 3.2 and should have been removed in 3.4 so its
removal is overdue.

Closes gh-44468
2025-02-27 19:01:10 +00:00
Stéphane Nicoll ed5ec225a7 Merge branch '3.4.x'
Closes gh-44417
2025-02-24 08:04:36 +01:00
Phillip Webb 651a39b3f6 Merge branch '3.4.x' 2025-02-18 15:12:07 -08:00
Phillip Webb eeced8c629 Merge branch '3.3.x' into 3.4.x 2025-02-18 15:11:51 -08:00
Stéphane Nicoll cacb3d4820 Polish "Remove deprecated micrometer.observations.annotations.enabled"
See gh-44320
2025-02-18 11:22:39 +01:00
Johnny Lim 1c9bc7f336 Remove deprecated micrometer.observations.annotations.enabled
See gh-44320

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-02-18 11:20:07 +01:00
Moritz Halbritter dc4dbd1bf2 Rename management.server.accesslog.prefix
Closes gh-44196
2025-02-17 14:48:49 +01:00
Andy Wilkinson b2ba2a53fe Polish "Add support for MVC router functions to mappings endpoint"
See gh-44163
2025-02-13 11:18:17 +00:00
puppy4c a747bcf6d4 Add support for MVC router functions to mappings endpoint
See gh-44163

Signed-off-by: puppy4c <puppy4c@foxmail.com>
2025-02-13 10:52:23 +00:00
Andy Wilkinson 4c097b9841 Merge branch '3.4.x'
Closes gh-44257
2025-02-13 10:50:02 +00:00
Yanming Zhou 437fc028a0 Include non-default HikariDataSource candidates in metrics
See https://github.com/spring-projects/spring-boot/issues/43481#issuecomment-2655527313

See gh-44253

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-02-13 10:35:08 +00:00
Andy Wilkinson 1710ff4eb5 Merge branch '3.4.x'
Closes gh-44248
2025-02-12 21:52:30 +00:00
Andy Wilkinson 4cb9d816b9 Include non-default candidates in metrics and health
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
2025-02-12 21:44:41 +00:00
Phillip Webb 291e5d8bd3 Polish 2025-02-10 17:02:01 -08:00
Brian Clozel afcc780e61 Write TraceId in HTTP Response headers
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
2025-02-10 18:08:31 +01:00
Andy Wilkinson f5f888dbdd Polish
See gh-44197
2025-02-10 15:28:05 +00:00
Andy Wilkinson 62b217e0da Apply mgmt access log prefix to reactive Jetty, Tomcat, and Undertow
Fixes gh-44197
2025-02-10 14:53:35 +00:00
Andy Wilkinson ceaffaab4e Merge branch '3.4.x'
Closes gh-44192
2025-02-10 10:28:08 +00:00
Andy Wilkinson c3c7ed4c2e Fix class cast during additional path matching with health probes
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
2025-02-10 10:01:19 +00:00
Andy Wilkinson c86ac9ecaf Merge branch '3.4.x'
Closes gh-44191
2025-02-10 09:37:21 +00:00
Andy Wilkinson 1c0253b380 Align reactive EndpointRequest with servlet equivalent
Closes gh-44189
2025-02-10 09:28:28 +00:00
Andy Wilkinson 4212ee7298 Merge branch '3.4.x'
Closes gh-44190
2025-02-10 09:27:01 +00:00
Andy Wilkinson 3603cb4ad9 Fix matching against context with implicit server namespace
Closes gh-44188
2025-02-10 09:18:46 +00:00
Johnny Lim 8c35bce668 Polish
See gh-44184

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-02-10 07:32:14 +01:00
Andy Wilkinson 8ce7da9bb0 Avoid duplicate customization of management web server factory
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
2025-02-07 12:23:40 +00:00
Johnny Lim c335f772d0 Polish
See gh-44148

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-02-07 09:21:19 +01:00
Phillip Webb 9576293a03 Polish 'Add ability to match Endpoint requests by HTTP method'
See gh-29596
2025-02-04 21:57:40 -08:00
onobc 996ee243a3 Add ability to match Endpoint requests by HTTP method
Update both servlet and reactive `EndpointRequest` classes with
support for matching endpoint requests by HTTP method.

See gh-29596
2025-02-04 21:56:14 -08:00
Phillip Webb 9881f38d82 Polish 'Add the ability to trigger a Quartz job through an Actuator endpoint'
See gh-43086
2025-02-04 16:29:52 -08:00
Dmytro Nosan fbeace397f Add the ability to trigger a Quartz job through an Actuator endpoint
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>
2025-02-04 16:29:39 -08:00
Dmytro Nosan 1749235dbd Polish PrometheusPushGatewayConfiguration
See gh-44069

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-02-04 14:02:47 -08:00
Andy Wilkinson 63ecfac40d Support Pushgateway with new Prometheus client
Closes gh-43923
2025-02-04 11:17:25 +00:00
Johnny Lim a39e1c4a09 Polish
Signed-off-by: Johnny Lim <izeye@naver.com>

See gh-44034
2025-01-31 17:04:58 +01:00
Moritz Halbritter 035c80aa5b Deprecate SignalFX tests
See gh-43962
2025-01-29 13:11:14 +01:00
Moritz Halbritter 58cc3a0d3d Deprecate SignalFX support
Closes gh-43962
2025-01-29 10:41:24 +01:00
Phillip Webb 7545bed284 Polish 2025-01-27 15:29:16 -08:00
Phillip Webb 3ff6e0b5a9 Merge branch '3.4.x' 2025-01-24 19:24:42 -08:00
Phillip Webb 8ec61b9870 Polish 'Refactor `@ConfigurationProperties` that only use `prefix`'
See gh-43917
2025-01-24 14:59:32 -08:00
Yanming Zhou c1d97ffe16 Refactor `@ConfigurationProperties` that only use `prefix`
See gh-43917

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-01-24 14:58:36 -08:00
Dmytro Nosan 126233303c Remove the use of a FactoryBean when auto-configuring VirtualThreadMetrics
See gh-43957

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
2025-01-24 14:05:26 +01:00