Commit Graph

371 Commits

Author SHA1 Message Date
Phillip Webb
913e831f4e Merge '1.5.x' into 2.0.x 2019-07-24 11:39:58 +01:00
Phillip Webb
fd67f7ba3f Merge branch '1.5.x' into 2.0.x 2019-07-17 21:47:04 +01:00
Phillip Webb
cfeb0239b7 Merge branch '1.5.x' into 2.0.x 2019-06-28 23:28:34 -07:00
Andy Wilkinson
c6c139d980 Merge branch '1.5.x' into 2.0.x 2019-06-07 10:46:31 +01:00
Phillip Webb
b442d3b906 Merge branch '1.5.x' into 2.0.x 2019-06-04 01:49:03 -07:00
Phillip Webb
07c000c5b7 Merge branch '1.5.x' into 2.0.x 2019-04-02 13:34:28 -07:00
Spring Operator
1a4c6f2dac Use HTTPS for external links wherever possible
See gh-16319
2019-03-27 20:06:52 +00:00
Andy Wilkinson
9fbd38ab3c Merge branch '1.5.x' into 2.0.x 2019-03-20 16:45:26 +00:00
Spring Operator
3e2b6ac8ed Update build and setup configuration to use HTTPS
See gh-16246
2019-03-19 16:58:31 +00:00
Brian Clozel
6138041578 Polish
Fixes gh-16014
2019-03-13 11:55:41 +01:00
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
2019-03-13 11:07:32 +01:00
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.
2019-03-11 21:07:20 -07:00
Andy Wilkinson
361437f4e2 Merge branch '1.5.x' into 2.0.x 2019-03-11 15:53:34 +00:00
Andy Wilkinson
affdbeef41 Polish 2019-03-07 10:08:39 +00:00
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
2019-01-08 21:45:06 +01:00
Stephane Nicoll
4509164789 Polish "Add unit test for cassandra health checker"
Closes gh-15583
2018-12-30 10:01:37 +01:00
Oleksii Bondar
db22a81742 Add unit test for cassandra health checker
See gh-15583
2018-12-30 10:00:59 +01:00
Andy Wilkinson
0741c90489 Avoid blocking on a Mono indefinitely
Closes gh-15535
2018-12-20 15:31:39 +00:00
Andy Wilkinson
425a3aacf5 Add JAXB API dependency that is no longer transitive via testcontainers
See gh-15371
2018-12-03 15:06:32 +00:00
Andy Wilkinson
7ddbb37bd5 Polish 2018-11-26 16:52:49 +00:00
Andy Wilkinson
d2756319cb Polish 2018-11-26 12:09:14 +00:00
Andy Wilkinson
4bc32e6358 Use a HandlerInterceptor for timing long tasks
Closes gh-15204
2018-11-26 11:30:06 +00:00
Phillip Webb
e4d5714d50 Polish "Skip scoped targets when determining endpoints"
See gh-15182
2018-11-15 10:41:14 -08:00
Rahul Ahuja
4853e6a7af Skip scoped targets when determining endpoints
Update `EndpointDiscoverer` to filter out scoped target beans when
finding endpoints.

Closes gh-15182
2018-11-15 10:38:05 -08:00
Johnny Lim
8470d649bc Polish
See gh-15134
2018-11-11 10:58:31 +01:00
Phillip Webb
33c7a74bee Update copyright year for changed files 2018-10-26 16:35:28 -07:00
Phillip Webb
7bcc793faf Fix WebMvcMetricsFilter logger imports
Don't use SLF4J loggers in `WebMvcMetricsFilter`.

Fixes gh-14953
2018-10-24 22:46:31 -07:00
Madhura Bhave
4322b9781b Polish 2018-10-23 14:21:06 -07:00
dreis2211
5c0d7f4ac0 Avoid creation of unnecessary collections
Closes gh-14916
2018-10-22 14:54:39 -07:00
Andy Wilkinson
2110215559 Provide more detailed uri tag for calls to Data REST repositories
Closes gh-14872
2018-10-19 18:19:58 +01:00
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
2018-10-19 10:43:23 +01:00
Phillip Webb
a12a6f2ade Polish 2018-10-15 21:24:35 -07:00
Phillip Webb
cd1c2638e5 Polish 2018-10-15 15:42:15 -07:00
Phillip Webb
5d219bcd19 Polish 2018-10-15 14:45:49 -07:00
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
2018-10-15 14:20:16 -07:00
Phillip Webb
c306e03112 Support '-' in endpoint names
Update the `EndpointId` constraints to allow '-' in names.

Closes gh-14773
2018-10-15 11:27:30 -07:00
Phillip Webb
d8b9685635 Support '.' in endpoint names
Update the `EndpointId` constraints to allow '.' in names.

Closes gh-14773
2018-10-15 09:37:44 -07:00
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
2018-10-15 13:44:42 +01:00
Hanope
535dd7470f Fix typo in EndpointIdTests
Closes gh-14822
2018-10-14 19:11:56 -07:00
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
2018-10-14 13:45:05 -07:00
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
2018-10-14 13:45:04 -07:00
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
2018-10-14 13:45:04 -07:00
Phillip Webb
c5786c218d Polish 2018-10-14 11:24:10 -07:00
Phillip Webb
30ab4f9691 Polish "Stop MetricsEndpoint from summing up same metrics"
See gh-14497
2018-10-11 15:31:40 -07:00
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
2018-10-11 15:18:35 -07:00
Andy Wilkinson
839e686c9e Fix Checkstyle violation 2018-10-10 12:43:06 +01:00
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
2018-10-10 12:20:34 +01:00
Andy Wilkinson
d3b3c8c64e Honour management.metrics.web.server.auto-time-requests with WebFlux
Closes gh-13895
2018-10-08 15:52:50 +01:00
Johnny Lim
1eca492c5e Polish
See gh-14621
2018-10-01 10:46:27 -04:00
Andy Wilkinson
6fba477d5e Remove redundant handling of a null exchange from WebFluxTags.uri()
Closes gh-14504
2018-09-18 11:59:19 +01:00