This is an attempt to stabilize the tests. They are currently flaky
due to a timeout that appears to occur because the mock web server isn't
responding quickly enough. A larger timeout will either confirm this if
the tests stabilize or indicate that the problem has a different cause
if they do not stabilize.
Closes gh-42375
A task's last execution is absent if it has not yet been executed.
This commit updates the documentation test to accommodate this
possibility.
See gh-42351
Add `toAdditionalPaths(...)` methods on the servlet and reactive
`EndpointRequest` classes to support matching of additional paths.
A new `AdditionalPathsMapper` interface provides the mappings between
endpoint IDs and any additional paths that they might use. The existing
`AutoConfiguredHealthEndpointGroups` class has been updated to implement
the interface.
Auto-configurations have also been updated so that additional health
endpoint paths (typically `/livez` and `/readyz`) are permitted
when using Spring Security without any custom configuration.
Fixes gh-40962
A task's next execution time is unknown if, for example, it's
currently running. When it's unknown the nextExecution.time will be
missing from the json describing the task. This commit updates the
documentation test to accommodate this possibility.
Closes gh-42351
This commit uses DataSource.isWrapperFor and DataSource.unwrap to detect
if a DataSource is an AbstractRoutingDataSource. Previously, it relied
on instanceof which does not account for cases where the datasource has
been proxied.
See gh-42313
Add `OpenTelemetryEventPublisherBeansTestExecutionListener` JUnit
class to automatically trigger early addition of the `ContextStorage`
wrapper. The listener has also been updated with a static `addWrapper()`
method that can be called directly for other test frameworks.
Closes gh-42005
Otlp Tracing's exporter is configured using Transport. Current support
for service connections read the mapped port for HTTP transport 4318.
This commits adds support to read port for GRPC transport 4317.
See gh-41333
This commit restores auto-configuration for using an Embedded broker
with ActiveMQ classic.
Contrary to its 2.7.x version, "spring-boot-starter-activemq" no longer
adds the broker for consistency with Artemis, and to keep the existing
3.x behavior. Rather than "inMemory", a "s.a.embedded.enabled"
property has been reintroduced that matches the name used by Artemis.
The documentation has been updated to mention that the broker
dependency must be added to use it.
Closes gh-38404
Add `OpenTelemetryEventPublisherApplicationListener` which uses a single
static `ContextStorage` wrapper which gets applied as early as possible.
The static wrapper is then updated as beans come and go.
By adding the wrapper early, we hope to avoid silent failures which
can occur if the `ContextStorage` gets initialized before the wrapper
is added.
Closes gh-41439
Deprecate `EndpointExposure.CLOUD_FOUNDRY` and introduce an alternative
implementation based on a pluggable abstraction.
The new `EndpointExposureOutcomeContributor` interface may now be used
to influence `@OnAvailableEndpointCondition` exposure results. Several
infrastructure beans that previously used the condition have been
refactored to always be registered, but tolerate missing endpoints.
A new smoke test application has been added that demonstrates how the
abstraction can be used by a third-party.
Closes gh-41135
Co-authored-by: Phillip Webb <phil.webb@broadcom.com>
This commit ensures that Health probes are automatically enabled when
the application runs on Cloud Foundry. This was already the case for
Kubernetes, but now that Cloud Foundry supports this feature we should
do the same.
Closes gh-39804
As of spring-projects/spring-framework#24560, Spring provides additional
metadata for scheduled tasks:
* next execution time
* last execution outcome (including status, time and raised exception)
This commit leverages this information to enhance the existing
`scheduledtasks` Actuator endpoint.
Closes gh-17585
- Deprecate Deprecate @MockBean and @SpyBean in favor of Spring
Framework 6.2's @MockitoBean and @MockitoSpy
- Migrate usages of @MockBean and @SpyBean to @MockitoBean and
@MockitoSpy
Signed-off-by: Jakob Wanger <jakobwanger@gmail.com>
See gh-39864
Depending on what tests had already run, Otel tests in
BaggagePropagationIntegrationTests could fail due to missing baggage
related entries in the MDC. The entries were missing if Otel's
ContextStorageWrappers had been marked as initialized without an
EventPublishingContextWrapper containing event publisher that will
publish to Slf4JBaggageEventListener.
ContextStorageWrappers uses a static so this commit avoids to problem
by forking a new classpath in BaggagePropagationIntegrationTests. This
ensures that any previous static state in ContextStorageWrappers has
no effect upon BaggagePropagationIntegrationTests.
This adds a property to provide some indicator that a set of
applications are part of a larger "business application" so that they
can be viewed in metrics, portals, traces and more.
See gh-39957
There are now three new properties, which control the trace exporting on
a more fine-grained level:
- management.otlp.tracing.export.enabled
- management.wavefront.tracing.export.enabled
- management.zipkin.tracing.export.enabled
They default to null, and if set, take precedence over the global
management.metrics.enabled property.
Closes gh-34620
Prior to this commit, applications could declare Actuator Endpoints
using web framework-specific annotations, such as `@ServletEndpoint`,
@ControllerEndpoint and @RestControllerEndpoint.
Such annotations are closely tied to the programming model of specific
web technologies, such as Servlet or Spring MVC. Unlike other
`@Endpoint` support, they are not portable and will not work
transparently over blocking/reactive and transports.
Because of the strong adherence of this support with the underlying
infrastructure, it makes it impossible to evolve the implementation of
Actuator support without breaking this use case. The reference
documentation has been advocating for using `@Endpoint` and
`@*Operation` for custom endpoints for a long time now.
This commit deprecates this specific support in favor of the recommended
approach.
Closes gh-31768
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
Deprecates the support for simpleclient but ensures that it can work in
conjunction with support for the latest Prometheus client
auto-configuration.
This involves breaking changes to update public classes to support the
latest Prometheus client. Deprecated support for Prometheus simpleclient
is provided in renamed classes.
See gh-40023
Properties under `server.ssl.server-name-bundles` and
`management.server.ssl.server-name-bundles` can be used to configure
mappings of host names to SSL bundles to support SNI in embedded web
servers.
Closes gh-26022
Update `ZipkinHttpClientSenderTests` to use one mock server per test
rather than a shared static. For some reason the mock server sometimes
seems to get itself in a deadlock state which causes the client to
fail with a `HttpTimeoutException`.
This commit simplifies the generics used for SessionRepository and
FindByIdNameSessionRepository as their type signatures already declare
that `S` extends from `Session`.
See gh-39751
Brave can work without zipkin2 on the classpath, OpenTelemetry can't.
To not force users to have zipkin2 on the classpath, move it into the
OpenTelemetry auto-configuration.
See gh-39049
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