Commit Graph

364 Commits (9fbd38ab3c1e43b81af3a10edec91bc4f3ef332b)

Author SHA1 Message Date
Andy Wilkinson 9fbd38ab3c Merge branch '1.5.x' into 2.0.x 6 years ago
Spring Operator 3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
6 years ago
Brian Clozel 6138041578 Polish
Fixes gh-16014
6 years ago
Johnny Lim a6ccdbe19f Handle missing exceptions in WebMvcMetricsFilter
Prior to this commit, exceptions nested in
`NestedServletExceptions` would not be recorded by the
`WebMvcMetricsFilter`. This commit ensures that exceptions
happening downstream (e.g. happening while writing the response
body itself) are properly recorded.

See https://github.com/micrometer-metrics/micrometer/issues/1190
See gh-16014
6 years ago
Phillip Webb 03beed603c Fix ScheduledTasksEndpointTests BaseConfiguration
Update the `BaseConfiguration` class in `ScheduledTasksEndpointTests`
to be package private so that it can be enhanced by cglib.

Prior to merge commit 361437f4 the class was a lite configuration so
it didn't matter that it was a private class.
6 years ago
Andy Wilkinson 361437f4e2 Merge branch '1.5.x' into 2.0.x 6 years ago
Andy Wilkinson affdbeef41 Polish 6 years ago
dreis2211 95e26ffcb9 Avoid uri tag explosion when use of path variable is undetected
This commit aligns the Spring WebFlux instrumentation on Spring MVC
since gh-12447.
From now on, if the best matching path pattern is not found,
the recorded uri tag will be "UNKNOWN".

Note that for WebFlux.fn, the pattern information is properly
recorded as of SPR-17395.

Closes gh-15609
6 years ago
Stephane Nicoll 4509164789 Polish "Add unit test for cassandra health checker"
Closes gh-15583
6 years ago
Oleksii Bondar db22a81742 Add unit test for cassandra health checker
See gh-15583
6 years ago
Andy Wilkinson 0741c90489 Avoid blocking on a Mono indefinitely
Closes gh-15535
6 years ago
Andy Wilkinson 425a3aacf5 Add JAXB API dependency that is no longer transitive via testcontainers
See gh-15371
6 years ago
Andy Wilkinson 7ddbb37bd5 Polish 6 years ago
Andy Wilkinson d2756319cb Polish 6 years ago
Andy Wilkinson 4bc32e6358 Use a HandlerInterceptor for timing long tasks
Closes gh-15204
6 years ago
Phillip Webb e4d5714d50 Polish "Skip scoped targets when determining endpoints"
See gh-15182
6 years ago
Rahul Ahuja 4853e6a7af Skip scoped targets when determining endpoints
Update `EndpointDiscoverer` to filter out scoped target beans when
finding endpoints.

Closes gh-15182
6 years ago
Johnny Lim 8470d649bc Polish
See gh-15134
6 years ago
Phillip Webb 33c7a74bee Update copyright year for changed files 6 years ago
Phillip Webb 7bcc793faf Fix WebMvcMetricsFilter logger imports
Don't use SLF4J loggers in `WebMvcMetricsFilter`.

Fixes gh-14953
6 years ago
Madhura Bhave 4322b9781b Polish 6 years ago
dreis2211 5c0d7f4ac0 Avoid creation of unnecessary collections
Closes gh-14916
6 years ago
Andy Wilkinson 2110215559 Provide more detailed uri tag for calls to Data REST repositories
Closes gh-14872
6 years ago
Andy Wilkinson 76ad197584 Deallocate servlet after forcing initialization in mappings endpoint
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
6 years ago
Phillip Webb a12a6f2ade Polish 6 years ago
Phillip Webb cd1c2638e5 Polish 6 years ago
Phillip Webb 5d219bcd19 Polish 6 years ago
Phillip Webb b25e222136 Retain original case when mapping endpoint paths
Update `MappingWebEndpointPathMapper` to keep the original case rather
than using a lower-case version.

Closes gh-14773
6 years ago
Phillip Webb c306e03112 Support '-' in endpoint names
Update the `EndpointId` constraints to allow '-' in names.

Closes gh-14773
6 years ago
Phillip Webb d8b9685635 Support '.' in endpoint names
Update the `EndpointId` constraints to allow '.' in names.

Closes gh-14773
6 years ago
Andy Wilkinson 6d98851fb5 Use Couchbase's DiagnosticsReport to determine its health
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
6 years ago
Hanope 535dd7470f Fix typo in EndpointIdTests
Closes gh-14822
6 years ago
Phillip Webb df5dfbf4be Support mixed case endpoint includes/excludes
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
6 years ago
Phillip Webb 138d85477d Support mixed case endpoint IDs with time-to-live
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
6 years ago
Phillip Webb 3105a38884 Introduce EndpointID to enforce naming rules
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
6 years ago
Phillip Webb c5786c218d Polish 6 years ago
Phillip Webb 30ab4f9691 Polish "Stop MetricsEndpoint from summing up same metrics"
See gh-14497
6 years ago
pmehra 950480dc1c Stop MetricsEndpoint from summing up same metrics
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
6 years ago
Andy Wilkinson 839e686c9e Fix Checkstyle violation 6 years ago
Andy Wilkinson 9e14fc6b8b Cope with hanging call to connection.start() in JmsHealthIndicator
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
6 years ago
Andy Wilkinson d3b3c8c64e Honour management.metrics.web.server.auto-time-requests with WebFlux
Closes gh-13895
6 years ago
Johnny Lim 1eca492c5e Polish
See gh-14621
6 years ago
Andy Wilkinson 6fba477d5e Remove redundant handling of a null exchange from WebFluxTags.uri()
Closes gh-14504
6 years ago
Andy Wilkinson 6020cb67d3 Polish javadoc of status method on WebFluxTags and WebMvcTags 6 years ago
Phillip Webb 9af6b3422f Polish 6 years ago
Johnny Lim ca57e58ee5 Polish
See gh-14293
6 years ago
Johnny Lim 3eef927499 Use InvalidEndpointRequestException for MetricsEndpoint
Closes gh-14291
6 years ago
Stephane Nicoll f9081a2c23 Revert "Polish some joining collectors"
See gh-14221
6 years ago
dreis2211 afda71e419 Polish some joining collectors
Closes gh-14221
6 years ago
Madhura Bhave b93c2b9a9f Allow actuator endpoints to be used with mvcMatchers
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
6 years ago