Previously, when using Tomcat, a call to mappings endpoint would force
the initialization of any DispatcherServlets in the context. This was
done by calling allocate on Tomcat's StandardWrapper. This left the
wrapper in a state that would cause it to block for two seconds during
shutdown as the wrapper has an outstanding allocation.
This commit immediately deallocates the servlet after it has been
allocated. This ensures that the DispatcherServlet has been initialized
while also leaving the wrapper in a state that it can shut down
immediately when asked to do so.
Closes gh-14898
SPR-17395 ensures that WebFlux.fn is adding a request attribute of type
`PathPattern` on the `HandlerMapping.BEST_MATCHING_PATTERN_ATTRIBUTE`.
A specific tag provider for WebFlux.fn is no longer necessary.
See gh-14876
Update `WebEndpointDiscoverer` and related classes to that multiple
`PathMapper` beans can be registered. Mappers are now tried in order
until one returns a non-null value.
Closes gh-14841
Previously, Couchbase's health was determined by retrieving the bucket info
from the cluster info. This retrieval could take over one minute in some
cases even when Couchbase is health. This latency is too large for a health
check.
The Couchbase team have recommended the of a Cluster#diagnostics instead.
This provides a much lower latency view of the cluster's health. This
commit updates CouchbaseHealthIndicator to use Cluster#diagnostics while
retaining support, in a deprecated form, for the old info-based mechanism
should anyone want to opt back into that in 2.0.x.
Closes gh-14685
Update `ExposeExcludePropertyEndpointFilter` so that mixed case
endpoint IDs are supported. Prior to this commit it was not easy for
an endpoint to be missed by the filter due to the formatting of the
property value.
See gh-14773
Update the endpoint time-to-live binding logic so that mixed case
endpoint IDs are supported. Prior to this commit an
`InvalidConfigurationPropertyNameException` would be thrown when using
a camel case endpoint ID.
See gh-14773
Add an `EndpointID` class to enforce the naming rules that we support
for actuator endpoints. We now ensure that all endpoint names contain
only letters and numbers and must begin with a lower-case letter.
Existing public classes and interfaces have been changes so that String
based `endpointId` methods are deprecated and strongly typed versions
are preferred instead. A few public classes that we're not expecting
to be used directly have been changed without deprecated methods being
introduced.
See gh-14773
Update `MetricsEndpoint` so that only the first matching meter is used
when calculating the sum of of statistics.
Prior this this commit the endpoint would consider all Meters. This
caused incorrect statistics when multiple back-end systems were being
used since the registries contained in the `CompositeMeterRegistry`
would be iterated, and the same effective metric would be counted more
than once.
Closes gh-14497
Previously, the API required to create HttpTrace instances was
package-private. This made it difficult to implement an
HttpTraceRepository that persists the HttpTrace instances
rather than holding them in memory as it inhibited recreation of the
instances when they read from the persistent store.
This commit adds public constructors to HttpTrace and related classes
to enable recreation of an HttpTrace. The package-private methods for
mutating properties have not been made public to ensure that the
public API remains immutable.
Closes gh-14726
Previously, if the call to connection.start() hung, JmsHealthIndicator
would also hang and then never respond.
This commit introduces the use of an additional thread that waits for
up to 5 seconds for the connection to start. If the call to start
does not complete within that time, the connection is closed. The
call to close causes the call to start to throw an exception, thereby
stopping the hang and allowing the indicator to report that the
broker is down.
Closes gh-10809
Rework Prometheus push gateway support so that the central class can
be used outside of auto-configuration. The shutdown flags have also
been replaced with a single "shutdown-operation" property since it's
unlikely that both "push" and "delete" will be required.
It's also possible now to supply a `TaskScheduler` to the manager.
See gh-14353
This commit aligns SessionsEndpoint with
FindByIndexNameSessionRepository API improvements that simplifies
retrieval of sessions by principal name.
Closes gh-14124
This commit changes AbstractWebMvcEndpointHandlerMapping to
be a MatchableHandlerMapping. Additionally, EndpointRequest,
now delegates to MvcRequestMatcher for Spring MVC applications.
For all other applications, AntPathRequestMatcher is used as
a delegate.
Closes gh-13962
This commit makes sure to use a configurable timeout to check if the
Couchbase cluster is up, rather than relying on the default that can be
quite long.
Closes gh-13879
Previously, the setter of a property whose second letter is upper-case (
such as `oAuth2Uri`) was not detected properly. The JavaBean spec states
that, in such a case, the first letter should not be capitalized (i.e.
the setter should be `setoAuth2Uri` rather than `setOAuth2Uri`).
This commit makes sure that Jackson uses standard bean names and fixes
the setter detection algorithm to take this case into account.
Closes gh-13878
Add an `DispatcherServletPath` interface which provides a much more
consistent way to discover the path of the main dispatcher servet.
Prior to this commit, auto-configurations would often make use of the
`ServerProperties` class to discover the dispatcher servlet path. This
mechanism isn't very explicit and also makes it hard for us to relocate
that property in Spring Boot 2.1.
This commit also reverts most of fddc9e9c7e since it is now clear that
the supporting multiple dispatcher servlet paths will be much more
involved that we originally anticipated.
Closes gh-13834
Previously, when a DispatcherServlet was registered via a
ServletRegistrationBean, the mappings endpoint did not expose any
information about it as it wasn't detected.
This commit fixes the detection of available DispatcherServlets in the
context so that the mappings endpoint include them all.
Closes gh-13186
This commit improves the for Actuator Metrics in WebClient.
Unlike the server couterpart of WebFlux, using a `retry` operator on a
`WebClient` pipeline does resubscribes to the whole chain.
The previous implementation recorded start time at the time of pipeline
build phase, but outside of it. This doesn't work since retrying the
same pipeline doesn't update the recorded start time and the duration of
sequential calls are cumulative.
This is now fixed using the Reactor `Context`, since we're now recording
the start time at subscription time and record metrics on `onNext` and
`onError` signals.
Closes gh-12228
Previously, a NullPointerException would occur when WebFluxTags
attempted to create a method Tag for a request with a non-standard
method.
This commit updates WebFluxTags to use getMethodValue(), which will
never return null, rather than getMethod(), which may return null,
when determining the tag's value for the given request.
Closes gh-13596