Commit Graph

1627 Commits (3.0.x)

Author SHA1 Message Date
Stephane Nicoll 6490edc16d Polish 4 years ago
Andy Wilkinson b9abcba778 Merge branch '2.4.x'
Closes gh-26596
4 years ago
Andy Wilkinson ff45e4c418 Merge branch '2.3.x' into 2.4.x
Closes gh-26595
4 years ago
Andy Wilkinson 936c31c7a7 Prevent metrics failures from adversely affecting web responses
Fixes gh-24151
4 years ago
Stephane Nicoll d3c817b7ba Polish "Remove unnecessary throws declaration in tests"
See gh-26441
4 years ago
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
4 years ago
Stephane Nicoll 367fd64c23 Merge branch '2.4.x'
Closes gh-26325
4 years ago
Stephane Nicoll c134c38a68 Merge branch '2.3.x' into 2.4.x
Closes gh-26324
4 years ago
Stephane Nicoll af70da0e92 Update copyright year of changed file
See gh-26321
4 years ago
Matthias Stock 6c8c735027 Fix typo in NamedContributors Javadoc
See gh-26321
4 years ago
Phillip Webb beaf03a008 Update copyright year of changed files 4 years ago
izeye e27c85698d Polish
See gh-26135
4 years ago
izeye 4987880afa Polish
See gh-25980
4 years ago
Phillip Webb f03f74ff0a Add Spring Data Repository metrics support
Add support for Spring Data Repository metrics by integrating with
Spring Data's new `RepositoryMethodInvocationListener` support.

Closes gh-22217
4 years ago
Phillip Webb 9f16491535 Rework @Timer annotation support
Rework existing `@Timer` annotation support to remove duplicate code
and offer general purpose utilities that can be used in future metrics
support.

See gh-23112
See gh-22217
4 years ago
Phillip Webb 3d7e5e3abd Polish 4 years ago
Phillip Webb 15fe41868e Polish 'Support @Timed annotation for WebFlux'
Extract common method logic to a `HandlerMethodTimedAnnotations`
utility class and also add some caching. Also move the test code
into a single class.

See gh-23112
4 years ago
anshlykov 4ff4a9b082 Support @Timed annotation for WebFlux
Update `MetricsWebFilter` to support `@Timed` annotations on the WebFlux
handler methods or beans.

See gh-23112
4 years ago
Phillip Webb e4164d0143 Fix package tangle in endpoint package
Fix package tangle in the actuator endpoint package by relocating a
few classes.

The `Producible` and `ProducibleOperationArgumentResolver` classes have
been moved from `endpoint.annotation` to `endpoint` since they aren't
directly tied to annotations.

The `ApiVersion` class has been moved from `endpoint.http` to
`endpoint` since it needs to implement `Producible` and isn't really
tied to HTTP.

Closes gh-25914
4 years ago
Phillip Webb 807ea1af0d Update copyright year of changed files 4 years ago
Stephane Nicoll b11602aeaa Polish "Add Quartz actuator endpoint"
This commit reworks the initial proposal so that jobs and triggers are
treated as first class concepts.

`/actuator/quartz` now returns the group names for jobs and triggers.

`actuator/quartz/jobs` returns the job names, keyed by the available
group names, while `/actuator/quartz/triggers` does the same for
triggers.

`/actuator/jobs/{groupName}` provides an overview of a job group. It
provides a map of job names with the class name of the job.
implementation

`/actuator/triggers/{groupName}` provides an overview of a trigger
group. There are five supported trigger implementations: cron, simple,
daily time interval, calendar interval, and custom for any other
implementation. Given that each implementation has specific settings,
triggers are split in five objects.

`/actuator/jobs/{groupName}/{jobName}` provides the full details of a
particular job. This includes a sanitized data map and a list of
triggers ordered by next fire time.

`/actuator/triggers/{groupName}/{triggerName}` provides the full details
of a particular trigger. This includes the state, its type, and a
dedicate object containing implementation-specific settings.

See gh-10364
4 years ago
Vedran Pavic 9795061360 Add Quartz actuator endpoint
See gh-10364
4 years ago
Stephane Nicoll dd916f908f Merge branch '2.4.x'
Closes gh-25880
4 years ago
izeye 852e5778a3 Polish
See gh-25875
4 years ago
Brian Clozel 72a1eb6384 Allow to manually tag request metrics with exceptions
Prior to this commit, some exceptions handled at the controller or
handler function level would:

* not bubble up to the Spring Boot error handling support
* not be tagged as part of the request metrics

This situation is inconsistent because in general, exceptions handled at
the controller level can be considered as expected behavior.
Also, depending on how the exception is handled, the request metrics
might not be tagged with the exception.
This will be reconsidered in gh-23795.

This commit prepares a transition to the new situation. Developers can
now opt-in and set the handled exception as a request attribute. This
well-known attribute will be later read by the metrics support and used
for tagging the request metrics with the exception provided.

This mechanism is automatically used by the error handling support in
Spring Boot.

Closes gh-24028
4 years ago
Andy Wilkinson 03e92d794b Merge branch '2.4.x'
Closes gh-25845
4 years ago
Andy Wilkinson 0e4b66a3ea Merge branch '2.3.x' into 2.4.x
Closes gh-25844
4 years ago
Andy Wilkinson 1a84b0610e Align PushGatewayManager's exception handling with PushMeterRegistry's
Previously, would log an error for any exception and also stop
publishing for an UnknownHostException. By constrast, Micrometer's
PushMeterRegistry treats all exceptions the same, logging a warning
and continuing with subsequent push attempts.

This commit updates the push gateway manager's behaviour to match
PushMeterRegistry. UknownHostExceptions no longer receive special
treatment and push (and delete) failures are now logged as warnings
rather than errors.

Fixes gh-25804
4 years ago
Phillip Webb 8c31d29acf Merge branch '2.4.x' 4 years ago
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
4 years ago
Andy Wilkinson d9ce30b15c Merge branch '2.3.x' into 2.4.x
See gh-25825
4 years ago
Andy Wilkinson 8b6eef6f1d Consistent use of @deprecated since
See gh-25808
4 years ago
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
4 years ago
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
4 years ago
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
4 years ago
Brian Clozel 61573fbf14 Record server metrics for cancelled connections
Prior to this commit, the Actuator instrumentation for WebFlux servers
would not record metrics in two cases:

* the client disconnects before the response has been sent
* a server timeout is triggered before the response is sent

This commit improves the existing instrumentation to record metrics in
these cases. Since the causes of timeouts/disconnections can vary a lot,
the chosen "outcome" tag for metrics is "UNKNOWN".

Closes gh-23606
4 years ago
Andy Wilkinson 9cc7f0b54d Generalize script-based DB initialization and add R2DBC initializer
See gh-24741
4 years ago
Phillip Webb 38584f0694 Merge branch '2.4.x'
Closes gh-25785
4 years ago
Phillip Webb 5274cf2459 Merge branch '2.3.x' into 2.4.x
Closes gh-25784
4 years ago
Phillip Webb 130cc5b036 Chain caught InvalidEndpointRequestExceptions
Update `AbstractWebMvcEndpointHandlerMapping` to chain any caught
InvalidEndpointRequestExceptions so that a more complete stacktrace
is available. The exception has also been updated to a
`ResponseStatusException` so that the reason can be propagated.

Fixes gh-25642
4 years ago
Andy Wilkinson 90b4ced7a6 Move DataSource init auto-config out of DataSourceAutoConfiguration
Previously, the auto-configuration for DataSource initialization and
the properties used to configure it were part of the general
DataSource auto-configuration and properties.

This commit moves the auto-configuration of DataSource initialization
out into a separate top-level auto-configuration class. Similarly,
the properties for configuring DataSource initialization have been
moved from `spring.datasource.*` into `spring.sql.init.*`.

The old initialization-related `spring.datasource.*` properties have
been deprecated but can still be used. When they are used, they new,
separate initialization auto-configuration will back off. In other
words, the initialization related `spring.datasource.*` properties
and the `spring.sql.init.*` properties cannot be used in combination.

Closes gh-25323
4 years ago
Phillip Webb 11a94ee6f0 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 82127fdaa3 Update copyright year of changed files 4 years ago
Andy Wilkinson ce3dfc5792 Merge branch '2.4.x'
Closes gh-25767
4 years ago
Andy Wilkinson 33cf8b3bc4 Merge branch '2.3.x' into 2.4.x
Closes gh-25765
4 years ago
Andy Wilkinson bf6f36a783 Apply any root URI to RestTemplate metric's URI tag
Previously, a root URI configured via RestTemplateBuilder's rootUri
method and RootUriTemplateHandler was not taken into account when
generated the URI tag for RestTemplate request metrics.

This commit updates MetricsClientHttpRequestInterceptor to be aware
of RootUriTemplateHandler and capture the URI template once the
root URI has been applied.

Fixes gh-25744
4 years ago
Phillip Webb 26ee346510 Polish 'Support OpenMetrics text format with Prometheus'
Closes gh-25564
4 years ago
Andy Wilkinson 11b4a19dee Support OpenMetrics text format with Prometheus
Update `PrometheusScrapeEndpoint` so that it can produce both classic
Prometheus text output as well as Openmetrics output.

See gh-25564
4 years ago
Phillip Webb c81a0223cc Refine 'Allow operations to produce different output'
Refine the new `Producible` support so that it can also be used with
`@ReadOperation`, `@WriteOperation` and `@DeleteOperation` annotations.

This update allows the same enum to be used both as an argument and as
an indicator of the media-types that an operation may produce.

Closes gh-25738
4 years ago
Andy Wilkinson 1ec49cee8b Allow operations to produce different output
Update the actuator @Enpoint` infrastructure code so that operations
may inject enums that indicate the type of output to produce. A new
`Producible` interface can be implemented by any enum that indicates
the mime-type that an enum value produces.

The new `OperationArgumentResolver` provides a general strategy for
resolving operation arguments with `ProducibleOperationArgumentResolver`
providing support for `Producible` enums. Existing injection support has
been refactored to use the new resolver.

See gh-25738
4 years ago
Phillip Webb 663fd8ce5e Update copyright year of changed files 4 years ago
Stephane Nicoll 2c8e78b082 Merge branch '2.4.x'
Closes gh-25574
4 years ago
Stephane Nicoll 6840440220 Merge branch '2.3.x' into 2.4.x
Closes gh-25573
4 years ago
Stephane Nicoll f38e863fbc Properly subscribe to CloseableConnectionFactory#close
Closes gh-25565
4 years ago
Stephane Nicoll 36f8a7b9a6 Upgrade copyright year of changed files
See gh-25451
4 years ago
izeye c823f44e76 Polish
See gh-25451
4 years ago
Andy Wilkinson f09630f73c Allow additional keys to be configured for value sanitization
Closes gh-25384
4 years ago
Andy Wilkinson 10ef991e1d Sanitize sensitive portion of the value of url and urls keys
Closes gh-25387
4 years ago
izeye 9f0f7d59ef Fix Javadoc since tag for ConfigurationPropertiesReportEndpointWebExtension
See gh-25314
4 years ago
Stephane Nicoll a16a2de3c3 Merge branch '2.4.x'
Closes gh-25296
4 years ago
Stephane Nicoll 0bc03c7141 Associate application classloader to auto-configured Hazelcast instance
Closes gh-24836
4 years ago
Stephane Nicoll b92bb9332b Polish "Filter properties with a particular prefix"
See gh-24718
4 years ago
bono007 ad7c69a9cd Filter properties with a particular prefix
This commit improves the configprops endpoint to allow filtering
properties based on a particular prefix

See gh-24718
4 years ago
Stephane Nicoll 948f61b4ca Polish contribution
See gh-25006
4 years ago
dreis2211 634dd979d1 Migrate from deprecated methods in AbstractWebFluxEndpointHandlerMapping
See gh-25006
4 years ago
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
4 years ago
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
4 years ago
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
4 years ago
Phillip Webb 61502bde9a Replace deprecated constructor with mutate builder
Update `ControllerEndpointHandlerMapping` to use the new `mutate()`
builder rather than deprecated constructors.

Closes gh-24999
4 years ago
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 4 years ago
Phillip Webb d06407ec0a Update copyright year of changed files 4 years ago
Phillip Webb ab0a628d81 Merge branch '2.4.x' 4 years ago
Phillip Webb d95d7a0245 Update code for Spring Framework 5.3.4
See gh-24998
4 years ago
Andy Wilkinson d15ec4cdb4 Upgrade to Liquibase 4.2.2
Closes gh-24952
4 years ago
Stephane Nicoll 012a199773 Remove Spring Data Solr support
In preparation to the upgrade to Spring Data 2021.0, this commit removes
auto-configuration for Spring Data Solr.

Closes gh-24939
4 years ago
Andy Wilkinson 48002e969f Merge branch '2.4.x'
Closes gh-24882
4 years ago
Andy Wilkinson 3ad2832cb2 Fix pattern extraction when MVC is using a PathPatternParser
Fixes gh-24874
4 years ago
Stephane Nicoll 0669f5604d Merge branch '2.4.x'
Closes gh-24873
4 years ago
Stephane Nicoll 59b01324ae Merge branch '2.3.x' into 2.4.x
Closes gh-24872
4 years ago
Stephane Nicoll 1ad5a3fe2e Update copyright of changed file
See gh-24753
4 years ago
izeye ddfa1e632b Make MetricsClientHttpRequestInterceptor defensive against metrics recoding failures
See gh-24753
4 years ago
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
4 years ago
Phillip Webb 304c49d73f Merge branch '2.4.x'
Closes gh-24795
4 years ago
Phillip Webb 26f143b8d3 Support @Name annotation on /actuator/configprops
Update `ConfigurationPropertiesReportEndpoint` so that supports
constructor parameters annotated with `@Name`.

Fixes gh-24713
4 years ago
Stephane Nicoll 632c1239e6 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
4 years ago
bono007 4b8d6efc12 Add support for GET requests for /actuator/startup
See gh-24717
4 years ago
Phillip Webb 45ca4a5a56 Merge branch '2.4.x'
Closes gh-24673
4 years ago
Phillip Webb ac4243d615 Merge branch '2.3.x' into 2.4.x
Closes gh-24672
4 years ago
Phillip Webb 52e47c4275 Fix test for JSR-350 @Nonnull
Closes gh-24647
4 years ago
Phillip Webb 2dfb9b0911 Merge branch '2.4.x'
Closes gh-24671
4 years ago
Phillip Webb 2b497b6aff Merge branch '2.3.x' into 2.4.x
Closes gh-24670
4 years ago
Phillip Webb 848ed65f5b Add test for JSR-350 @Nonnull
Closes gh-24647
4 years ago
Phillip Webb bd3dd0a526 Merge branch '2.4.x'
Closes gh-24655
4 years ago
Phillip Webb ab8080353e Merge branch '2.3.x' into 2.4.x
Closes gh-24654
4 years ago
Phillip Webb 2ad9a47d08 Support JSR-305 annotations on endpoint methods
Update `OperationMethodParameter` to additionally support JSR-305 based
`@Nullable` annotations.

Closes gh-24647
4 years ago
Stephane Nicoll 5da27ea57a Polish "Reduce the overhead of char[] creation"
See gh-24204
4 years ago
Marten Deinum 5121ca5d17 Reduce the overhead of char[] creation
See gh-24204
4 years ago
Phillip Webb 72d36e0c07 Update copyright year of changed files 4 years ago
Stephane Nicoll 105cf591bf Merge branch '2.3.x'
See gh-24418
4 years ago
Stephane Nicoll ab99de4349 Polish
See gh-24418
4 years ago
Stephane Nicoll 0d472d6f74 Start building against Spring Data 2020.0.2 snapshots
See gh-24284
4 years ago
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
4 years ago
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
4 years ago
Phillip Webb d8a05090b3 Fix checkstyle BDD Mockito violations
See gh-24337
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago
dreis2211 0389a07f7c Remove deprecated code in EndpointDiscoverer
See gh-24317
4 years ago
Scott Frederick 01478a25b4 Handle wrapper types in Env actuator
This commit modifies the actuator `EnvironmentEndpoint` to allow
primitive wrapper types to be serialized in the response data
structure.

Fixes gh-24307
4 years ago
Stephane Nicoll b1678ee6ad Merge branch '2.3.x'
Closes gh-24251
4 years ago
Stephane Nicoll 9b992af34b Merge branch '2.2.x' into 2.3.x
Closes gh-24250
4 years ago
Stephane Nicoll d506f0c73e Polish "Reduce redis health indicator info command result size"
See gh-24208
4 years ago
xJoeWoo 99cc3f4bfc Reduce redis health indicator info command result size
See gh-24208
4 years ago
Andy Wilkinson 11c81ad245 Merge branch '2.3.x'
Closes gh-24223
4 years ago
Andy Wilkinson 7efa1e47aa Merge branch '2.2.x' into 2.3.x
Closes gh-24222
4 years ago
Andy Wilkinson 12f2529be5 Allow actuator endpoint to have responses with custom HTTP statuses
Fixes gh-24123
4 years ago
Stephane Nicoll e708667fc0 Merge branch '2.3.x'
Closes gh-24194
4 years ago
Stephane Nicoll 76912d1952 Merge branch '2.2.x' into 2.3.x
Closes gh-24193
4 years ago
Stephane Nicoll d3440880c4 Polish "Avoid unnecessary pattern compilation in WebFluxTags"
See gh-24147
4 years ago
Peter Paul Bakker b22bb7ea04 Avoid unnecessary pattern compilation in WebFluxTags
See gh-24147
4 years ago
dreis2211 5ef6e09c64 Fix deprecation warnings in javadoc comments
See gh-24120
4 years ago
Phillip Webb b0c2687aa9 Update copyright year of changed files 4 years ago
Scott Frederick 1a3f810cd8 Prevent serialization exception from Env actuator
When `EnvironmentEndpoint` is building a response to return to the
web infrastructure, it creates a data structure containing all
property values from all property sources. Prior to this commit, it
was possible for the response data structure to contain property
values that were not serializable to JSON by Jackson, which would
cause an exception to be thrown by the web infrastructure. This
commit ensures the data structure is serializable to JSON by
ensuring property values are primitives or Strings, and returning
a placeholder value if a property value is of any other type.

Fixes gh-23805
4 years ago
Andy Wilkinson 7df18d9a91 Polish 4 years ago
Andy Wilkinson 2673bc00fd Adapt to breaking change in Framework's RouterFunctions.Visitor
See gh-23774
4 years ago
Stephane Nicoll 34c4c3f235 Expose cache metrics for Redis
This commit adds support for Redis cache metrics. Users can opt-in for
statistics using the "spring.cache.redis.enable-statistics" property.

Closes gh-22701
4 years ago
Scott Frederick b59e0bd3a6 Replace deprecated API in ElasticsearchReactiveHealthIndicator
Fixes gh-23537
4 years ago
Stephane Nicoll 35d41e4ae2 Remove code deprecated in Spring Boot 2.2
Closes gh-22034
4 years ago
dreis2211 ecee9c0f9b Avoid unnecessary explicit initialization of Atomics
Constructor calls like new AtomicInteger(0) cause a volatile write that
can be saved in cases where the constructor parameter is the default
value.

See gh-23575
4 years ago
Stephane Nicoll 6f08e9709e Polish "Improve Cassandra health indicator with more robust mechanism"
See gh-23041
4 years ago
tomekl007 8e5a041bb4 Improve Cassandra health indicator with more robust mechanism
See gh-23041
4 years ago
Madhura Bhave 7c22e71753 Polish "Deprecate EmbeddedDatabaseConnection#HSQL"
See gh-23565
4 years ago
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
4 years ago
Andy Wilkinson ad6de10f14 Remove use of deprecated SDR API when describing request mappings
Closes gh-22654
4 years ago
Stephane Nicoll 4009acf025 Add support for Hazelcast
This commit upgrades to Hazelcast 4.0.3, yet keeping compatibility with
Hazelcast 3.x.

Closes gh-20856
Closes gh-23475
4 years ago
Phillip Webb 363d35a0ac Merge branch '2.2.x' into 2.3.x
Closes gh-23444
4 years ago
Phillip Webb b443d22c59 Merge branch '2.1.x' into 2.2.x
Closes gh-23443
4 years ago
Phillip Webb cc442c5c0d Make HandlerFunctionDescription JDK 15 compatible
Update `HandlerFunctionDescription` so that it will work with JDK 15.

Closes gh-23442
4 years ago
Phillip Webb c284edde67 Update copyright year of changed files 4 years ago
Brian Clozel 20eb8d0fc2 Merge branch '2.3.x'
Closes gh-23253
4 years ago
Brian Clozel 62cb87bd95 Merge branch '2.2.x' into 2.3.x
Closes gh-23252
4 years ago
David Good 775f0fa861 Improve sanitization for list of URI types
Prior to this commit, Actuator would sanitize properties values when
serializing them on the dedicated endpoint. Keys like "password" or
"secret" are entirely sanitized, but other keys like "uri" or "address"
are considered as URI types and only the password part of the user info
is sanitized.

This commit fixes the sanitization process where lists of such URI types
would not match the first entries of the list since they're starting
with `'['`. This commit improves the regexp matching process to sanitize
all URIs within a collection.

The documentation is also updated to better underline the processing
difference between complete sanitization and selective sanitization for
URIs.

Fixes gh-23037
4 years ago
Brian Clozel d2e67ab84d Align WebClient uri metric tag with RestTemplate
Prior to this commit, the `WebClientExchangeTags`, when given a request
without a string template, would only get the request path to create the
"uri" tag for metrics. This is inconsistent with the
`RestTemplateExchangeTags`, which are taking the full request URI minus
the protocol+host+port.

This commit aligns the `WebClientExchangeTags` behavior in this case.

Closes gh-22832
4 years ago
Stephane Nicoll b9b7393053 Deprecate Cassandra health indicators that rely on Spring Data
With the introduction of health indicators that only require the
CqlSession, this commit deprecates the health indicators that require
Spring Data since the latter build on top of the former.

Closes gh-23226
4 years ago
Brian Clozel 1d73d4eda7 Remove Elasticsearch RestClient auto-configuration
Prior to this commit, Spring Boot would auto-configure both
Elasticsearch variants: `RestClient` ("Low Level" client) and
`RestHighLevelClient` ("High Level" client).
Since one can be derived from the other, this would create complex and
unclear situations depending on what developers provided with their
configuration.

`RestHighLevelClient` is mostly for actual use of the Elasticsearch API,
with support for specific methods and (de)serialization. On the other
hand, `RestClient` is merely wrapping the Apache HTTP client for
load-balancing support and low level HTTP features.

This commit completely removes the support for `RestClient` in Spring
Boot and now requires the presence of the
`org.elasticsearch.client:elasticsearch-rest-high-level-client`
dependency for REST client support with Elasticsearch.

Closes gh-22358
4 years ago
Brian Clozel 8dcb3312f2 Switch startup actuator endpoint to using HTTP POST
Closes gh-23213
4 years ago
Brian Clozel 676e1809fb Add startup Actuator endpoint
This commit builds on top of gh-22603 and exposes data collected by the
`BufferingApplicationStartup` on a dedicated `"/startup"` Actuator
endpoint.

Closes gh-23213
4 years ago
Pradipta Sarma 2627bf896e Removed some redundant 'else's using early return
See gh-22528
4 years ago
Andy Wilkinson 72c6435078 Polish
See gh-23157
4 years ago
Stephane Nicoll f4c8668afd Merge branch '2.3.x'
Closes gh-23157
4 years ago
Stephane Nicoll 652561c274 Review checkstyle rule to prevent non BDD mockito imports
Closes gh-20902
4 years ago
Phillip Webb cf8776b83c Expose originParents on actuator endpoints
Update `ConfigurationPropertiesReportEndpoint` and `EnvironmentEndpoint`
so that they expose `originParents` when they are available.

Closes gh-23018
4 years ago
Andy Wilkinson 6cfd2e3a33 Merge branch '2.3.x'
Closes gh-23095
4 years ago
Andy Wilkinson c74e0be0d2 Merge branch '2.2.x' into 2.3.x
Closes gh-23094
4 years ago
Andy Wilkinson 04540887af Widen timeout and delay to accommodate Windows' imprecision under load
Closes gh-23093
4 years ago
Johnny Lim e48af31ced Polish
See gh-23081
4 years ago
Phillip Webb ea8762c484 Update copyright year of changed files 4 years ago
Andy Wilkinson e358144b2e Polish "Exclude cookie headers by default from HTTP traces"
See gh-22829
4 years ago
Emily Tsanova 5ff515727d Exclude cookie headers by default from HTTP traces
See gh-22829
4 years ago
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
4 years ago
Stephane Nicoll f2a52a87ec Merge branch '2.3.x'
Closes gh-22850
4 years ago
Stephane Nicoll 980ddcffd0 Merge branch '2.2.x' into 2.3.x
Closes gh-22849
4 years ago
Stephane Nicoll dd9c9fd171 Polish "Migrate legacy endpoint that have a dash in their id"
See gh-21615
4 years ago
Gabriele Bianchet-David 0f9f10f97e Migrate legacy endpoint that have a dash in their id
See gh-21615
4 years ago
Stephane Nicoll 13260eab46 Merge branch '2.3.x'
Closes gh-22846
4 years ago
ksmilek 5cb1b41355 Fix wrong reference in `ReadinessStateHealthIndicator` javadoc
See gh-22760
4 years ago
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 4 years ago
Stephane Nicoll dac63fc3e5 Polish 4 years ago
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
4 years ago
Andy Wilkinson 8b40427402 Merge branch '2.3.x'
Closes gh-22687
4 years ago
Andy Wilkinson 7d25948ab5 Merge branch '2.2.x' into 2.3.x
Closes gh-22686
4 years ago
Andy Wilkinson 59b1df4548 Polish "Look in correct context when finding Liquibase beans"
See gh-22681
4 years ago
biergit 62156810cf Look in correct context when finding Liquibase beans
See gh-22681
4 years ago
Stephane Nicoll 5777aa5615 Start building against Spring Data 2020.0.0 snapshots
See gh-22647
4 years ago
Stephane Nicoll c6fde1e4d5 Polish "Update Neo4j health check to use the Neo4j Driver"
See gh-22302
4 years ago
Gerrit Meier c5a7815e42 Update Neo4j health check to use the Neo4j Driver
This commit replaces the Neo4j-OGM based health checks with one based on
the Neo4j Java driver. A Reactive variant is also added in this commit.

See gh-22302
4 years ago
Stephane Nicoll 2756f5911f Merge branch '2.3.x'
Closes gh-22627
4 years ago
Stephane Nicoll 12d78b26b9 Merge branch '2.2.x' into 2.3.x
Closes gh-22626
4 years ago
Stephane Nicoll 16aa8fbc88 Fix actuator dependency on Jackson JSR 310 module
This commit harmonizes dependency declarations for Jackson in the
actuator. Both Jackson and JSR 310 are back to optional in the core
actuator module and mandatory when using the auto-configuration.

Closes gh-22624
4 years ago
Phillip Webb 3d7d9d064c Update copyright year of changed files 4 years ago
Phillip Webb 14c1b0938a Polish 4 years ago
Phillip Webb da69286838 Merge branch '2.3.x' 4 years ago
Phillip Webb d2a7808098 Polish 4 years ago
Phillip Webb 217b2eff89 Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb b5e70157dc Update copyright year of changed files 4 years ago
Phillip Webb 51a26a4d5a Polish 4 years ago
Andy Wilkinson 0ac7178ae1 Merge branch '2.3.x'
Closes gh-22491
4 years ago
dreis2211 198131f5e4 Remove redundant compiler arguments in Gradle build files
See gh-22488
4 years ago
Andy Wilkinson 19ad163486 Merge branch '2.3.x'
Closes gh-22411
4 years ago
Andy Wilkinson accc1f1ca8 Merge branch '2.2.x' into 2.3.x
Closes gh-22410
4 years ago
Andy Wilkinson 21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
4 years ago
Andy Wilkinson 179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
4 years ago
Andy Wilkinson cb7f99ad72 Polish "Measure with nanoseconds in HttpExchangeTracer"
See gh-22266
4 years ago
dreis2211 d72f5139f1 Measure with nanoseconds in HttpExchangeTracer
See gh-22266
4 years ago
Brian Clozel 3f93978e99 Merge branch '2.3.x'
Closes gh-22215
4 years ago
Brian Clozel 86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
4 years ago
Aleksander Lech 203878a16f Add support for reactive Elasticsearch healthcheck
Prior to this commit, configuring a reactive Elasticsearch client would
auto-configure an Actuator Health check using a synchronous client, with
the default configuration properties (so tarting localhost:9200).

This would lead to false reports of unhealthy Elasticsearch clusters
when using reactive clients.

This commit reproduces the logic for MongoDB repositories: if a reactive
variant is available, it is selected for the health check
infrastructure.

See gh-21042
4 years ago
Andy Wilkinson 4ea07f432d Merge branch '2.3.x'
Closes gh-22168
4 years ago
Andy Wilkinson 75fc140e2d Merge branch '2.2.x' into 2.3.x
Closes gh-22167
4 years ago
Andy Wilkinson 3922fb7164 Polish "Avoid NPE when binder is closed before started event"
See gh-22141
4 years ago
im47cn b34c268547 Avoid NPE when binder is closed before started event
Previously, if TomcatMetricsBinder destroy() was called before it had
received an ApplicationStartedEvent an NPE would be thrown due to
TomcatMetrics being null. This NPE was then caught and logged at
warning level by the disposable bean adapter.

This prevents the NPE by checking that the TomcatMetrics instance is
null before calling close() on it.

See gh-22141
4 years ago
Andy Wilkinson fe78be240a Merge branch '2.3.x'
Closes gh-22103
4 years ago
Andy Wilkinson a2f7ce0564 Merge branch '2.2.x' into 2.3.x
Closes gh-22102
4 years ago
Andy Wilkinson 5475f10657 Remove WebClient's in-memory buffer size limit for endpoint tests
Previously, the thread dump endpoint's response could exceed
WebClient's in-memory buffer limt when there were a large number of
threads or the threads had large stacks.

This commit disables WebClient's in-memory buffer size limit so that
the test passing is not dependent on the number of active threads and
their stack sizes.

Closes gh-22101
4 years ago
Scott Frederick 3b587449a6 Provide cluster info in RedisReactiveHealthIndicator
This commit changes the information provided by
RedisReactiveHealthIndicator to include cluster details when Spring
Data Redis detects that Redis is running in a clustered configuration.
This brings the reactive and non-reactive Redis health indicators
into alignment.

Fixes gh-21514
4 years ago
Scott Frederick dba8ca2848 Merge branch '2.3.x'
Closes gh-22095
4 years ago
Scott Frederick 72f37c41fb Merge branch '2.2.x' into 2.3.x
Fixes gh-22061 in 2.3.2
4 years ago
Scott Frederick b27303704f Fix RedisReactiveHealthIndicator in clustered configuration
Prior to Spring Data Redis version 2.2.8, the contents of the
Properties object returned from the
ReactiveRedisConnection.ServerCommands.info API were the same
for clustered and non-clustered Redis configurations, containing a set
of key/value pairs. This allowed ReactiveRedisHealthIndicator to get
a version property using a well-known key. Starting with Spring Data
Redis 2.2.8, the info property keys contain a host:port prefix in a
clustered Redis configuration. This prevented
ReactiveRedisHealthIndicator from getting the version property as
before and resulted in the health always being reported as DOWN.

This commit adjusts ReactiveRedisHealthIndicator to detect the
clustered configuration from Spring Data Redis and find the version
property for one of the reported cluster nodes.

Fixes gh-22061
4 years ago
Andy Wilkinson 0d6ea79007 Start building against Spring Framework 5.3.0 snapshots
See gh-21929
4 years ago
Stephane Nicoll f0f8424191 Merge branch '2.3.x'
Closes gh-22008
4 years ago
dreis2211 855d596c2a Use lazy lambda instead of explicit argument
See gh-21986
4 years ago
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
4 years ago
Andy Wilkinson 9636350b0b Enable rawtypes compilation warnings
See gh-21271
4 years ago
Andy Wilkinson 056d5f3120 Enable deprecation compilation warnings
See gh-21271
4 years ago
Andy Wilkinson c64649a6d9 Enable unchecked compilation warnings
See gh-21271
4 years ago
Andy Wilkinson 07fb4b065d Merge branch '2.3.x'
Closes gh-21940
4 years ago
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
4 years ago
Stephane Nicoll e87c3193ce Polish "Add Java 15 CI"
See gh-21713
4 years ago
dreis2211 cf3cd0be48 Use Class.getName() as fallback in HandlerFunctionDescription
In JDK 15 the concept of hidden classes was introduced, which also
affects Lambdas in so far that Class.getCanonicalName() will return null
for those. This commit uses Class.getName() as a fallback when no
canonical name is available.

See gh-21713
4 years ago
Stephane Nicoll 35e069e2cd Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
4 years ago
Alexandre Dutra dad9ec86d5 Add health indicator for Cassandra that uses the CqlSession
This commit provides a CassandraDriverHealthIndicator and
CassandraDriverReactiveHealthIndicator that do not require Spring Data.
As a result, a health indicator for Cassandra is provided even if the
application does not use Spring Data.

See gh-20887
4 years ago
Stephane Nicoll 554971d29b Merge branch '2.3.x'
Closes gh-21917
4 years ago
Stephane Nicoll ee250e058a Merge branch '2.2.x' into 2.3.x
Closes gh-21916
4 years ago
Stephane Nicoll ec8c1e3860 Update copyright year of changed files
See gh-21906
4 years ago
lltx de897b9b72 Fix wrong property reference to keys-to-sanitize in Javadoc
See gh-21906
4 years ago
Phillip Webb 16b1d64b43 Merge branch '2.3.x'
Closes gh-21764
5 years ago
dreis2211 eeb1db2176 Use supplier assertions in availability indicator
See gh-21758
5 years ago
Phillip Webb 8a7a5929ae Merge branch '2.3.x' 5 years ago
Phillip Webb cc50605687 Merge branch '2.2.x' into 2.3.x 5 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
5 years ago
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
5 years ago
Stephane Nicoll 1d2d76b051 Merge branch '2.2.x'
Closes gh-21560
5 years ago
Stephane Nicoll afcb5d54b2 Polish "Fix uri tag for empty path"
See gh-21392
5 years ago
Jon Schneider f78f2d57e1 Fix uri tag for empty path
See gh-21392
5 years ago
Phillip Webb fd505e516f Merge branch '2.2.x'
Closes gh-21444
5 years ago
Phillip Webb 49a21ded7a Create endpoint beans as late as possible
Update `EndpointDiscoverer` so that `@Endpoint` and `@EndpointExtension`
beans are created as late as possible.

Prior to this commit, endpoint beans and extension beans would be
created during the discovery phase which could cause early bean
initialization. The problem was especially nasty when using an embedded
servlet container since `ServletEndpointRegistrar` is loaded as the
container is initialized. This would trigger discovery and load all
endpoint beans, including the health endpoint, and all health indicator
beans.

Fixes gh-20714
5 years ago
Phillip Webb 038ae93406 Update copyright year of changed files 5 years ago
Scott Frederick a30740f8d2 Separate server properties for message and errors
Prior to this commit, there was a property server.error.include-details
that allowed configuration of the message and errors attributes in a
server error response.

This commit separates the control of the message and errors attributes
into two separate properties named server.error.include-message and
server.error.include-binding-errors. When the message attribute is
excluded from a servlet response, the value is changed from a
hard-coded text value to an empty value.

Fixes gh-20505
5 years ago
Stephane Nicoll ee913503b4 Tolerate Hazelcast 4
This commit updates HazelcastHealthIndicator and
HazelcastCacheMeterBinderProvider so that they work with
Hazelcast 4 while retaining compatibility with Hazelcast 3. Reflection
is used when necessary.

This commit also adds a smoke test that validates those features are
working when Hazelcast 4 is on the classpath.

Closes gh-21169
5 years ago
Brian Clozel ec871d6752 Fix StatusAggregator static initialization
Prior to this commit, there was a cycle between `StatusAggregator` and
`SimpleStatusAggregator`, which caused a static initialization bug -
depending on which class (the implementation or its interface) was
loaded first.

This commit turns the static field of the `StatusAggregator` interface
into a static method to avoid this problem.

Fixes gh-21211
5 years ago
dreis2211 5eb5bf0a2d Polish
See gh-21009
5 years ago
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
5 years ago
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
5 years ago
Phillip Webb 56711d678a Merge branch '2.2.x'
Closes gh-21083
5 years ago
Phillip Webb 102729b5e1 Merge branch '2.1.x' into 2.2.x
Closes gh-21082
5 years ago
Phillip Webb b3d33754a5 Remove outdated FIXMEs from tests
Closes gh-19782
5 years ago
Phillip Webb bf41da5322 Update copyright year of changed files 5 years ago
Scott Frederick 70d4994502 Disable exception details on default error views
Prior to this commit, default error responses included the message
from a handled exception. When the exception was a BindException, the
error responses could also include an errors attribute containing the
details of the binding failure. These details could leak information
about the application.

This commit removes the exception message and binding errors detail
from error responses by default, and introduces a
`server.error.include-details` property that can be used to cause
these details to be included in the response.

Fixes gh-20505
5 years ago
dreis2211 b0eea26260 Prevent shaded imports from Datastax
See gh-20967
5 years ago
Phillip Webb 5311c04437 Change HealthEndpointGroups customization support
Update the `HealthEndpointGroups` customization support to use a
post-processor rather than a mutable registry. Although this approach
is slightly less flexible, it removes a lot of complexity from the
`HealthEndpointGroups` code. Specifically, it allows us to drop the
`HealthEndpointGroupsRegistry` interface entirely.

The probe health groups are now added via the post-processor if they
aren't already defined. Unlike the previous implementation, users are
no longer able to customize status aggregation and http status code
mapping rules _unless_ they also re-define the health indicators that
are members of the group.

See gh-20962
5 years ago
Phillip Webb 82cfd7c6c9 Restructure probes auto-configuration
Relocate probe auto-configuration from the `kubernetes` package to
`availability` since probes could also be used on other platforms.

The classes have also been renamed to named to `AvailabilityProbes...`

See gh-20962
5 years ago
Phillip Webb 71e4801e68 Rename probe health indicators
Rename `LivenessProbeHealthIndicator` to `LivenessStateHealthIndicator`
and `ReadinessProbeHealthIndicator` to `ReadinessStateHealthIndicator`.

Also introduce a general purpose `AvailabilityStateHealthIndicator`
class.

See gh-20962
5 years ago
Phillip Webb bb79c847b2 Allow custom availability states
Create a general purpose `AvailabilityState` interface and refactor
the existing `LivenessState` and `ReadinessState` to use it. A single
`AvailabilityChangeEvent` is now used to carry all availability state
updates.

This commit also renames `ApplicationAvailabilityProvider` to
`ApplicationAvailabilityBean` and extracts an `ApplicationAvailability`
interface that other beans can inject. The helps to hide the event
listener method, which is really internal.

Finally the state enums have been renamed as follows:

 - `LivenessState.LIVE` -> `LivenessState.CORRECT`
 - `ReadinessState.READY` -> `ReadinessState.ACCEPTING_TRAFFIC`
 - `ReadinessState.UNREADY` -> `ReadinessState.REFUSING_TRAFFIC`

See gh-20962
5 years ago
Phillip Webb 1604cb2a1e Polish 5 years ago
dreis2211 4b9986d790 Remove unused fields in tests
See gh-20926
5 years ago
Brian Clozel ce653059c8 Improve recording of cancellation signal in WebClient
With its initial fix in gh-18444, the `WebClient` instrumentation would
record all CANCEL signals, including:

* when a `timeout` expires and the response has not been received
* when the client partially consumes the response body

Since the second use case is arguable intentional, this commit restricts
the instrumentation and thus avoids recording two events for a single
request in that case.

Closes gh-18444
5 years ago
Brian Clozel 3879a7505c Record cancelled client requests in WebClient
Prior to this commit, cancelled client requests (for example as a result
of a `timeout()` reactor operator would not be recorded by Micrometer.

This commit instruments the cancelled signal for outgoing client
requests and assigns a status `CLIENT_ERROR`.
The cancellation can be intentional (triggering a timeout and falling
back on a faster alternative) or considered as an error. The intent
cannot be derived from the signal itself so we're considering it as a
client error.

Closes gh-18444
5 years ago
Phillip Webb 3ca896e63f Polish 5 years ago
Phillip Webb 5d8d0bb159 Update copyright year of changed files 5 years ago
Andy Wilkinson f238812cea Polish "Improve handling of non-existent path in disk space health check"
See gh-20580
5 years ago
Andreas Born db565cfc3a Improve handling of non-existent path in disk space health check
See gh-20580
5 years ago
Stephane Nicoll ef592eaed8 Merge branch '2.2.x'
Closes gh-20726
5 years ago
Stephane Nicoll ac56db703e Merge branch '2.1.x' into 2.2.x
Closes gh-20725
5 years ago
Stephane Nicoll 88b7b78344 Make sure that cassandra health check reports version
Closes gh-20719
5 years ago
Stephane Nicoll a7e8829560 Polish 5 years ago
Stephane Nicoll 5ad4de184d Merge branch '2.2.x'
Closes gh-20718
5 years ago
Stephane Nicoll 05f10819c4 Merge branch '2.1.x' into 2.2.x
Closes gh-20717
5 years ago
Stephane Nicoll c9e32aaa47 Use LOCAL_ONE when querying system.local
This commit is a follow-up of gh-20709 to apply the same consistency
level to the Cassandra reactive health indicator.

Closes gh-20713
5 years ago
Stephane Nicoll 876371e0fd Merge branch '2.2.x'
Closes gh-20712
5 years ago
Stephane Nicoll a9a6df2ed4 Merge branch '2.1.x' into 2.2.x
Closes gh-20711
5 years ago
Stephane Nicoll 63be1678de Polish "Use LOCAL_ONE when querying system.local"
See gh-20709
5 years ago
Alexandre Dutra 851f631eac Use LOCAL_ONE when querying system.local
The system keyspace has a replication factor of 1 and is local to each
node; it is therefore recommended to query system.local with a
consistency level of ONE or LOCAL_ONE.

Stronger consistency levels may result in an Unavailable error, but this
does not mean that the node is down.

See gh-20709
5 years ago
dreis2211 674f1e77b5 Fix typos
See gh-20704
5 years ago
Brian Clozel eb70fd952f Turn LivenessState and ReadinessState into enums
Prior to this commit, `LivenessState` and `ReadinessState` were
immutable classes. This was done in order to have additional behavior
and information in those classes.

Because the current implementation doesn't need this, this commit turns
those classes into simple enums.
Additional state and information can be added to the
`*StateChangedEvent` classes.

See gh-19593
5 years ago
dreis2211 25f48cb289 Fix typos in HealthEndpointGroupConfigurer
See gh-20628
5 years ago
Phillip Webb 0717de723f Polish 5 years ago
Phillip Webb 9a33a723fe Update copyright year of changed files 5 years ago
Phillip Webb 16b5ea3414 Update copyright year of changed files 5 years ago
dreis2211 ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
5 years ago
Stephane Nicoll 70aa788747 Merge branch '2.2.x'
Closes gh-20600
5 years ago
Stephane Nicoll 8593270b5b Only remove trailing slash from URI value
This commit upgrades the algorithm when trailing slash are to be
ignored. Previously a root URI (i.e. "/") would result to to empty
string which is an issue for monitoring system that requires tag values
to be non empty. If the URI is a single character, the trailing is not
applied and "/" is left as is.

Closes gh-20536
5 years ago
Brian Clozel ffdf9a422f Polish Liveness and Readiness support
This commit moves the core Liveness and Readiness support to its own
`availability` package. We've made this a core concept independent of
Kubernetes.

Spring Boot now produces `LivenessStateChanged` and
`ReadinessStateChanged` events as part of the typical application
lifecycle.

Liveness and Readiness Probes (`HealthIndicator` components and health
groups) are still configured only when deployed on Kubernetes.

This commit also improves the documentation around Probes best practices
and container lifecycle considerations.

See gh-19593
5 years ago
Brian Clozel fd0b2f6695 Add Kubernetes Liveness and Readiness Probes support
Prior to this commit and as of Spring Boot 2.2.0, we would advise
developers to use the Actuator health groups to define custom "liveness"
and "readiness" groups and configure them with subsets of existing
health indicators.

This commit addresses several limitations with that approach.

First, `LivenessState` and `ReadinessState` are promoted to first class
concepts in Spring Boot applications. These states should not only based
on periodic health checks. Applications should be able to track changes
(and adapt their behavior) or update states (when an error happens).

The `ApplicationStateProvider` can be injected and used by applications
components to get the current application state. Components can also
track specific `ApplicationEvent` to be notified of changes, like
`ReadinessStateChangedEvent` and `LivenessStateChangedEvent`.
Components can also publish such events with an
`ApplicationEventPublisher`. Spring Boot will track startup event and
application context state to update the liveness and readiness state of
the application. This infrastructure is available in the
main spring-boot module.

If Spring Boot Actuator is on the classpath, additional
`HealthIndicator` will be contributed to the application:
`"LivenessProveHealthIndicator"` and `"ReadinessProbeHealthIndicator"`.
Also, "liveness" and "readiness" Health groups will be defined if
they're not configured already.

Closes gh-19593
5 years ago
Brian Clozel b680db6cd8 Add HealthEndpointGroupsRegistry and its Customizer
Prior to this commit, `HealthContributor` would be exposed under the
main `HealthEndpoint` and subgroups, `HealthEndpointGroups`. Groups are
driven by configuration properties and there was no way to contribute
programmatically new groups.

This commit introduces the `HealthEndpointGroupsRegistry` (a mutable
version of `HealthEndpointGroups`) and a
`HealthEndpointGroupsRegistryCustomizer`. This allows configurations to
add/remove groups during Actuator auto-configuration.

Closes gh-20554
5 years ago
Stephane Nicoll abe43b2e83 Upgrade to Couchbase SDK v3
This commit upgrades to the Couchbase SDK v3 which brings the following
breaking changes:

* Bootstrap hosts have been replaced by a connection string and the
authentication is now mandatory.
* A `Bucket` is no longer auto-configured. The
`spring.couchbase.bucket.*` properties have been removed
* `ClusterInfo` no longer exists and has been replaced by a dedicated
API on `Cluster`.
* `CouchbaseEnvironment` no longer exist in favour of
`ClusterEnvironment`, the customizer has been renamed accordingly.
* The bootstrap-related properties have been removed. Users requiring
custom ports should supply the seed nodes and initialize a Cluster
themselves.
* The endpoints-related configuration has been consolidated in a
single IO configuration.

The Spring Data Couchbase provides an integration with the new SDK. This
leads to the following changes:

* A convenient `CouchbaseClientFactory` is auto-configured.
* Repositories are configured against a bucket and a scope. Those can
be set via configuration in `spring.data.couchbase.*`.
* The default consistency property has been removed in favour of a more
flexible annotation on the repository query methods instead. You can now
specify different query consistency on a per method basis.
* The `CacheManager` implementation is provided, as do other stores for
consistency so a dependency on `couchbase-spring-cache` is no longer
required.

See gh-19893

Co-authored-by: Michael Nitschinger <michael@nitschinger.at>
5 years ago
dreis2211 3e24df3beb Fix method order checkstyle issue
See gh-20525
5 years ago
Andy Wilkinson 0315724126 Cache endpoint responses on a per-principal basis
Previously, any HTTP request to an endpoint that included a principal
would bypass the cache. This prevented authenticated requests from
making use of the cache and its configurable time-to-live.

This commit updates the caching operation invoker to include the
principal, if any, in its cache key. As a result, requests that
include a principal will make use of the cache, potentially returning
the result of a previous invocation of the same endpoint by the same
principal.

Closes gh-19538
5 years ago
Andy Wilkinson ef9960c69f Allow additional tags to be contributed to WebMvc and WebFlux defaults
Closes gh-20175
5 years ago
Andy Wilkinson c917b61484 Reinstate leading / in default value for spring.liquibase.change-log
Unfortunately, while redundant for new applications, removing the
leading slash adversely affected existing application upon upgrades as
it caused Liquibase to re-apply every change log.

Closes gh-20177
5 years ago
Stephane Nicoll 278f769f80 Merge branch '2.2.x' 5 years ago
Stephane Nicoll 1fdb08300b Polish 5 years ago
Scott Frederick 185f644877 Remove the body from actuator 404 responses
When a request to the /actuator/env/{toMatch} endpoint does not match a
property, a response status 404 was being returned along with a body
containing the existing property sources. This commit removes the body
from the response to be more consistent with a typical 404 response.

Fixes gh-20314
5 years ago
Stephane Nicoll fa8a09d46d Merge branch '2.2.x'
Closes gh-20395
5 years ago
dreis2211 f08a9db984 Fix some deprecations
See gh-20388
5 years ago
Johnny Lim bd08b4d91c Polish DataSourceHealthIndicator
See gh-20367
5 years ago
Stephane Nicoll 51c29229d3 Polish "Improve details of neo4h health indicator"
See gh-20356
5 years ago
Said BOUDJELDA b09d5d27e0 Improve details of neo4h health indicator
This commit changes the neo4j health indicator to provide the version
and edition of the neo4j database.

See gh-20356
5 years ago
Stephane Nicoll 89e5c285e5 Merge branch '2.2.x'
Closes gh-20387
5 years ago
Johnny Lim 1721aeccb0 Use ServerHttpResponse.getRawStatusCode() in WebFluxTags
See gh-19987
5 years ago
Stephane Nicoll 925756dae1 Polish "Add descriptions for data source pool metrics"
See gh-20354
5 years ago
Johnny Lim 21a0b0544a Add descriptions for data source pool metrics
See gh-20354
5 years ago
Stephane Nicoll 45e6058761 Add R2BC connection pool metrics
This commit adds metrics support for `ConnectionPool` beans.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
Co-authored-by: Tadaya Tsuyukubo <tadaya@ttddyy.net>
5 years ago
Stephane Nicoll bee7302fc7 Add R2BC connection factory health check
This commit adds an health indicator for R2DBC. If a validation query is
provided, it is used to validate the state of the database. If not, a
check of the connection is issued.

See gh-19988

Co-authored-by: Mark Paluch <mpaluch@pivotal.io>
5 years ago
Brian Clozel e73ee7b3fe Merge branch '2.2.x'
Closes gh-20293
5 years ago
Brian Clozel 11b9862064 Revert "Clear ProducesRequestCondition cache attribute"
Closes gh-20292
5 years ago
Brian Clozel ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
5 years ago
Dmytro Nosan 1a8c321a7b Support nested requests in MetricsClientHttpRequestInterceptor
Prior to this commit, requests made by `HttpRequestInterceptor`
instances configured on `RestTemplate` would not be recorded
properly.

This commit ensures that nested requests are recorded separately.

Closes gh-20231
5 years ago
Stephane Nicoll 26c673a1a4 Merge branch '2.2.x' 5 years ago
Stephane Nicoll 592ae85043 Merge branch '2.1.x' into 2.2.x 5 years ago
Stephane Nicoll 6aeff91f50 Polish 5 years ago
Stephane Nicoll 287d577aea Merge branch '2.2.x'
Closes gh-20218
5 years ago
Stephane Nicoll 16111f126e Use query-less datasource validation by default
This commit changes DataSourceHealthIndicator to validate the connection
rather than issuing a query to the database. If a custom validation
query is specified, it uses that as before.

Closes gh-17582
5 years ago
Brian Clozel e59d3fbb86 Clear ProducesRequestCondition cache attribute
As of spring-projects/spring-framework#22644, Spring Framework caches
the "produces" condition when matching for endpoints in the
`HandlerMapping` infrastructure. This has been improved in
spring-projects/spring-framework#23091 to prevent side-effects in other
implementations.

Prior to this commit, the Spring Boot actuator infrastructure for
`EndpointHandlerMapping` would not clear the cached attribute,
presenting the same issue as Spring Framework's infrastructure. This
means that a custom arrangement with custom `HandlerMapping` or
`ContentTypeResolver` would not work properly and reuse the cached
produced conditions for other, unintented, parts of the handler mapping
process.

This commit clears the cached data and ensures that other handler
mapping implementations are free of that side-effect.

Fixes gh-20150
5 years ago
Stephane Nicoll 03bee83991 Update copyright date
See gh-20192
5 years ago
zhangt2333 e2d87a89d0 Polish
See gh-20192
5 years ago
Stephane Nicoll 2ede9e63b9 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
5 years ago
Stephane Nicoll 32c1dd45a9 Revert "Merge pull request #19926 from xak2000"
Closes gh-19926
5 years ago
Brian Clozel 97af0b2f3a Add actuator specific ObjectMapper
Prior to this commit, Actuator endpoints would use the application
ObjectMapper instance for serializing payloads as JSON. This was
problematic in several cases:

* application-specific configuration would change the actuator endpoint
output.
* choosing a different JSON mapper implementation in the application
would break completely some endpoints.

Spring Boot Actuator already has a hard dependency on Jackson, and this
commit uses that fact to configure a shared `ObjectMapper` instance that
will be used by the Actuator infrastructure consistently, without
polluting the application context.

This `ObjectMapper` is used in Actuator for:

* JMX endpoints
* Spring MVC endpoints with an HTTP message converter
* Spring WebFlux endpoints with an `Encoder`
* Jersey endpoints with a `ContextResolver<ObjectMapper>`

For all web endpoints, this configuration is limited to the
actuator-specific media types such as
`"application/vnd.spring-boot.actuator.v3+json"`.

Fixes gh-12951
5 years ago
Stephane Nicoll 466c1ba251 Merge branch '2.2.x'
Closes gh-20118
5 years ago
Stephane Nicoll a425cc1b46 Merge branch '2.1.x' into 2.2.x
Closes gh-20117
5 years ago
Ruslan Stelmachenko 5f7e1ac4f2 Remove unnecessary leading slash in changelog locations
See gh-19926
5 years ago
Madhura Bhave 19b7dc8e4f Merge branch '2.2.x'
Closes gh-20114
5 years ago
Madhura Bhave d485708f68 Fix 404 when composite contributor is added to a group
Fixes gh-19974
5 years ago
Madhura Bhave eeab9233cc Merge branch '2.2.x'
Closes gh-20056
5 years ago
Madhura Bhave acc453db4a Polish contribution
See gh-19999
5 years ago
cbono badc83d368 Add 'uris', 'address' and 'addresses' to keys to sanitize.
See gh-19999
5 years ago
Stephane Nicoll 1c87325420 Merge branch '2.2.x' 5 years ago
Stephane Nicoll d85bdfb23c Fix checkstyle violation 5 years ago
Stephane Nicoll 9aef2bde77 Merge branch '2.2.x'
Closes gh-20030
5 years ago
Stephane Nicoll 10643b7702 Polish "Stop time web metrics when autotime is disabled"
See gh-19981
5 years ago
babjo e323e05eea Stop time web metrics when autotime is disabled
See gh-19981
5 years ago
Scott Frederick 60f5bb1636 Remove health actuator code deprecated in 2.2
This partially re-applies the deprecation removal from commit
df1837a16b,
without removing CompositeHealthIndicator, HealthAggregator, and related
configuration that is required by Spring Cloud.
5 years ago
Scott Frederick de1a26cf35 Revert "Remove deprecated HealthIndicator and HealthAggregator 2.2 code"
This reverts commit df1837a16b.
5 years ago
Stephane Nicoll b5e23e7405 Update copyright year of changed files
See gh-20020
5 years ago
Johnny Lim b67ece48e4 Polish
See gh-20020
5 years ago
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
5 years ago
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
5 years ago
dreis2211 56df70b0e7 Use Spring 5 module of Jersey
See gh-20009
5 years ago
Johnny Lim e6d5f5a271 Polish
See gh-19995
5 years ago
Andy Wilkinson 6db5ca97d3 Sort names alphabetically in metrics list response
Closes gh-19934
5 years ago
Madhura Bhave dc542b29d8 Merge branch '2.2.x'
Closes gh-19977
5 years ago
Johnny Lim f3aed11714 Update test name in WebFluxTagsTests
See gh-19976
5 years ago
Stephane Nicoll cb7e8cdbef Merge branch '2.2.x'
Closes gh-19904
5 years ago
Stephane Nicoll 99330325c0 Merge branch '2.1.x' into 2.2.x
Closes gh-19903
5 years ago
Stephane Nicoll 7fd8cce465 Polish "Close TomcatMetrics on shutdown for cleanup"
See gh-19880
5 years ago
Johnny Lim 51dfd528bd Close TomcatMetrics on shutdown for cleanup
See micrometer-metrics/micrometer#1424
See gh-19880
5 years ago
Phillip Webb 77bbe089b2 Update copyright year of changed files 5 years ago
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
5 years ago
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
5 years ago
Stephane Nicoll 08967bca3e Merge branch '2.2.x'
Closes gh-19843
5 years ago
Stephane Nicoll 84324c438b Merge branch '2.1.x' into 2.2.x
Closes gh-19842
5 years ago
Stephane Nicoll 34c263a828 Polish actuator dependencies and test resources
This commit removes references of cache infra following the move to
Micrometer. We no longer ships an infinispan specific binder so the
dependency has been removed as well.

Closes gh-19838
5 years ago
dreis2211 991bcf5ce4 Revisit documentation that mentions Gradle "compile" configuration
See gh-19797
5 years ago
Scott Frederick 8f102aee68 Remove deprecated 2.2 code
See gh-19699
5 years ago
Scott Frederick 2e32cb2af1 Remove deprecated HealthIndicator and HealthAggregator 2.2 code
See gh-19699
5 years ago
Scott Frederick 1f1b06dfe2 Remove deprecated Actuator metrics 2.2 code
See gh-19699
5 years ago
Scott Frederick 7031a3b17d Remove deprecated logging properties
See gh-19699
5 years ago
Stephane Nicoll 421c464dd8 Deprecate CachingOperationInvoker#apply
This commit deprecates the only public accessor to
`CacheOperationInvoker` so that we can make the entire class package
private in the next feature release.

Closes gh-19089
5 years ago
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
5 years ago
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
5 years ago
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
5 years ago
Phillip Webb 862462b791 Update copyright year of changed files 5 years ago
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 5 years ago
Phillip Webb 15652ae4c1 Update copyright year of changed files 5 years ago
Madhura Bhave d1f51e064b Merge branch '2.2.x'
Closes gh-19701
5 years ago
Madhura Bhave e60194c7d5 Ignore trailing slash when recording Web metrics
Fixes gh-18207
5 years ago
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
5 years ago
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
5 years ago
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
5 years ago
Dmytro Nosan 25838b4794 Support nested requests in MetricsClientHttpRequestInterceptor
Prior to this commit, requests made by `HttpRequestInterceptor`
instances configured on `RestTemplate` would not be recorded
properly.

This commit ensures that nested requests are recorded separately.

See gh-19381
5 years ago
Andy Wilkinson 7595336184 Build against Spring Integration 5.3.0.M1 snapshots
See gh-19650
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Madhura Bhave abe95fa8a7 Merge branch '2.2.x'
Closes gh-19600
5 years ago
Madhura Bhave 7f0573df49 Fallback on underlying server default when determining outcome tag
This commit also changed the default outcome to SUCCESS

Fixes gh-19367
5 years ago
Stephane Nicoll 7d6f4a6666 Merge branch '2.2.x'
Closes gh-19590
5 years ago
Stephane Nicoll 99c64b7cdf Merge branch '2.1.x' into 2.2.x
Closes gh-19589
5 years ago
Matthias Stock adfbbcc0f6 Simplify validation pattern of EndpointId
See gh-19584
5 years ago
Andy Wilkinson 4efd8ba587 Merge branch '2.2.x'
Closes gh-19574
5 years ago
Andy Wilkinson 02965e9744 Fix javadoc warnings
Fixes gh-19572
5 years ago
Stephane Nicoll 6fc52b0563 Polish 5 years ago
Stephane Nicoll 2c1e81adf0 Polish 5 years ago
Phillip Webb 695de2c6f5 Polish end-to-end configuration properties tracing
See gh-14880
5 years ago
Madhura Bhave 8dcf1e4033 Provide end-to-end traceability for config properties
Closes gh-14880

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
Stephane Nicoll 20bebdc07d Merge branch '2.2.x'
Closes gh-19331
5 years ago
dreis2211 b1158bf35d Simplify some Stream API usages
See gh-19291
5 years ago
Madhura Bhave b42bc1b23d Merge branch '2.2.x'
Closes gh-19314
5 years ago
Madhura Bhave ed571bab24 Merge branch '2.1.x' into 2.2.x
Closes gh-19313
5 years ago
dreis2211 20ff764756 Increase cache ttl in CachingOperationInvokerTests
See gh-19193
5 years ago
Andy Wilkinson ae5ec4e41a Merge branch '2.2.x'
Closes gh-19300
5 years ago
Andy Wilkinson 758b80a0fe Merge branch '2.1.x' into 2.2.x
Closes gh-19299
5 years ago
luoyuan c6a184474c Remove redundant hasText check as query always has text
See gh-19290
5 years ago
Madhura Bhave 0a2387ed0b Merge branch '2.2.x'
Closes gh-19279
5 years ago
Madhura Bhave 2c4a1f1c15 Display @Validated constructor bound properties in configprops endpoint
Fixes gh-19219
5 years ago
Andy Wilkinson b6fb251097 Merge branch '2.2.x'
Closes gh-19191
5 years ago
Andy Wilkinson 189f74220c Merge branch '2.1.x' into 2.2.x
Closes gh-19190
5 years ago
Andy Wilkinson e8eace2d5b Polish "Fix Liquibase endpoint's output with multiple datasources"
See gh-19171
5 years ago
Leo Li 5302d91930 Fix Liquibase endpoint's output with multiple datasources
Previously, the endpoint used the same change log history service for
for each SpringLiquibase bean that it processed. This resulted in
pollution of the reported changes as the history of each bean was not
isolated.

This commit updates the endpoint to use a new history service for each
SpringLiquibase bean that is processed.

See gh-19171
5 years ago
Stephane Nicoll 79201b61b6 Merge branch '2.2.x'
Closes gh-19158
5 years ago
Stephane Nicoll ce16c9e945 Merge branch '2.1.x' into 2.2.x
Closes gh-19157
5 years ago
Stephane Nicoll 2356462587 Polish "Remove '.' and '-' reference in the EndpointId javadoc"
See gh-19101
5 years ago
Lars Grefer 58e599b6c1 Remove '.' and '-' reference in the EndpointId javadoc
Endpoint ID's which contain '-' or '.' cause a deprecation warning.
Therefore they shouldn't be doumented as valid characters.

See gh-19101
5 years ago
dreis2211 8a730ff630 Use DateTimeFormatter in favor of SimpleDateFormat
See gh-19142
5 years ago
Stephane Nicoll 12c5cdceb1 Merge branch '2.2.x'
Closes gh-19104
5 years ago
thelproad 65ab82b3cd Remove redundant code
See gh-19000
5 years ago
dreis2211 21dc7e9ca3 Fix StepVerifier usage in HealthIndicatorReactiveAdapterTests 5 years ago
dreis2211 0bdcd2ee67 Handle ApiVersion in CachingOperationInvoker
Prior to this commit, ApiVersion was treated as a mandatory parameter in
CachingOperationInvokerAdvisor and thus prevented the
CachingOperationInvoker to kick in. By skipping ApiVersion in the same
way we're skipping SecurityContext we can avoid this.

In order to not return the same cached response, this commit also
changes the cache handling in CachingOperationInvoker to account for
different ApiVersions being passed.

See gh-18961
5 years ago
Madhura Bhave 6e22ddc1a6 Merge branch '2.1.x' into 2.2.x 5 years ago
Madhura Bhave 849a76c6c2 Polish 5 years ago
Madhura Bhave ff22bd4827 Merge branch '2.1.x' into 2.2.x
Closes gh-19059
5 years ago
Madhura Bhave a3a53d299f Check authorities when exposing health details
Fixes gh-18998
5 years ago
dreis2211 6b500d82b4 Polish
See gh-18918
5 years ago
Stephane Nicoll 86a1c96224 Make sure health endpoint is available with no contributor
This commit makes sure that the health endpoint returns a default health
status when no contributors are available. Previously, it was returning
`null` which leads to a 404 when exposed via HTTP.

Closes gh-18676
5 years ago
dreis2211 1b2112ea8c Reduce method visibility in EndpointDiscovererTests
See gh-18884
5 years ago
Andy Wilkinson ce01f7f150 Merge branch '2.1.x'
Closes gh-18882
5 years ago
Andy Wilkinson ed50bf2494 Honour EndpointFilter configured on an endpoint's superclass
Previously, @EndpointFilter would only have an effect when used as
an annotation or meta-annotation on the endpoint class itself. It
would have no effect when used on a super-class of the endpoint
bean's class.

This commit updates EndpointDiscoverer so that an @EndpointFilter
annotation or meta-annotation on a super-class will be found and
applied to the discovery process. This is achieved by using find…
rather than get… when retrieving the attributes for the EndpointFilter
annotation.

Fixes gh-17866
5 years ago
Phillip Webb b3e9a06476 Polish 5 years ago
Stephane Nicoll d6d32ec01d Polish 5 years ago
Stephane Nicoll 11e0045ec6 Polish contribution
See gh-18736
5 years ago
mattisonchao f61da8b723 Polish
See gh-18736
5 years ago
dreis2211 9ece2e277f Remove redundant explicit types
See gh-18754
5 years ago
dreis2211 911b12f28d Fix JsonParser deprecation
See gh-18750
5 years ago
Stephane Nicoll 3d253854e9 Handle constructor bound configuration properties in /configprops
This commit updates the configprops actuator endpoint to detect
configuration properties that are bound using a constructor.

Closes gh-18636
5 years ago
Phillip Webb 597baf9774 Polish "Optimize logger calls"
See gh-18710
5 years ago
wycm 240b1f9e29 Optimize logger calls
Guard logger calls to ensure that they are only made when the
level is set.

See gh-18710
5 years ago
Phillip Webb ba30ee03df Improve health contributor null support
Update `NamedContributorsMapAdapter` to check for `null` keys or values
during construction. Also update `HealthEndpointSupport` to allow
null component entries.

See gh-18687
5 years ago
Phillip Webb 7c9ac03014 Filter empty health contributions
Update `HealthEndpointSupport` so that aggregate elements that don't
ultimately provide a contribution are filtered out. Prior to this
commit an NPE was returned when calculating the aggregate status.

Fixes gh-18687
5 years ago
dreis2211 8ecdf919f8 Fix Mockito deprecations
See gh-18689
5 years ago
Stephane Nicoll d254c62712 Polish tests 5 years ago
Stephane Nicoll 64401216b0 Merge branch '2.1.x'
Closes gh-18614
5 years ago
contextshuffling a8c6540191 Use LinkedHashSet for deterministic order in test assertion
See gh-18612
5 years ago
Stephane Nicoll 9c6e5f0904 Merge branch '2.1.x'
Closes gh-18585
5 years ago
dreis2211 abfb87d1a3 Rename tests to match Surefire expectations
See gh-18579
5 years ago
dreis2211 d8de6fff53 Polish
See gh-18557
5 years ago
dreis2211 3174f06bf2 Remove usage of @InjectMocks
See gh-18557
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
5 years ago
Phillip Webb 869a8c2691 Merge branch '2.1.x'
Closes gh-18411
5 years ago
Phillip Webb 38968d2fff Polish 'Apply TTL invocation caching on reactor types'
Extract reactor specific code to an inner class to protect
against ClassNotFound exceptions if reactor is not in use.

Also add support for `Flux`.

See gh-18339
5 years ago
dreis2211 33d8bfa99d Apply TTL invocation caching on reactor types
Update `CachingOperationInvoker` so that TTL caching is applied directly
to reactive types. Prior to this commit, a `Mono` would be cached, but
the values that it emitted would not.

See gh-18339
5 years ago
Stephane Nicoll 15eeedb59a Merge branch '2.1.x'
Closes gh-18380
5 years ago
Phillip Webb a94ab673a3 Add health endpoint 'show-components' support
Add a `show-components` property under `management.endpoint.health` and
`management.endpoint.health.group.<name>` that can be used to change
when components are displayed.

Prior to this commit it was only possible to set `show-details` which
offered an "all or nothing" approach to the resulting JSON. The new
switch allows component information to be displayed whilst still hiding
potentially sensitive details returned from the actual `HealthIndicator`.

Closes gh-15076
5 years ago
Phillip Webb 69c561a69a Rename health JSON 'details' to 'components' in v3
Update the health endpoint so the nested components are now exposed
under `components` rather than `details` when v3 of the actuator
REST API is being used.

This distinction helps to clarify the difference between composite
health (health composed of other health components) and health
details (technology specific information gathered by the indicator).

Since this is a breaking change for the REST API, it is only returned
for v3 payloads. Requests made accepting only a v2 response will have
JSON provided in the original form.

Closes gh-17929
5 years ago
Phillip Webb cd1b7c1a9c Test v3 actuator API with loggers endpoint
Update `LoggersEndpointWebIntegrationTests` to ensure that the new
v3 media type can be used.

See gh-17929
5 years ago
Phillip Webb deb9d67cef Add Actuator ApiVersion support and bump version
Add `ApiVersion` enum that can be injected into actuator endpoints if
they need to support more than one API revision.

Spring MVC, WebFlux and Jersey integrations now detect the API version
based on the HTTP accept header. If the request explicitly accepts a
`application/vnd.spring-boot.actuator.v` media type then the version
is set from the header. If no explicit Spring Boot media type is
accepted then the latest `ApiVersion` is assumed.

A new v3 API revision has also been introduced to allow upcoming health
endpoint format changes. By default all endpoints now consume and
can produce v3, v2 and `application/json` media types.

See gh-17929
5 years ago
Phillip Webb 323a78c4b9 Add property to migrate deprecated endoint IDs
Allow legacy actuator endpoint IDs that contain dots to be transparently
migrated to the new format. This update will allow Spring Cloud users
to proactively migrate from endpoints such as `hystrix.stream` to
`hystrixstream`.

Closes gh-18148
5 years ago
Stephane Nicoll c2df1afff0 Start building against Spring Integration 5.2.0 snapshots
See gh-18254
5 years ago
Phillip Webb 221ff0ff6d Polish configuration property bean classes
Refactor the `org.springframework.boot.actuate.context` package
with the following changes:

- Deprecate several classes which would ideally be internal

- Replace `ConfigurationBeanFactoryMetadata` with a new
  `ConfigurationPropertiesBean` class to better reflect that we no
  longer maintain meta-data directly.

- Use constructor injection and final fields whenever possible

- Rename `ConfiguraionPropertiesBeanDefinition` to
  `ConfigurationPropertiesValueObjectBeanDefinition` to align
  with the binder changes made in commit 0b3015e4ff

- Add additional tests

Closes gh-16903
5 years ago
Johnny Lim b70be97cbf Polish
See gh-18281
5 years ago
Brian Clozel ce2c26e934 Use Reactor's new Schedulers.boundedElastic()
Prior to this commit, Spring Boot would use `Schedulers.elastic()` when
required to process blocking tasks in a reactive environment.
reactor/reactor-core#1804 introduced a new scheduler,
`Schedulers.boundedElastic()` that behaves quite similarly but:

* will limit the number of workers thread
* will queue tasks if no worker thread is available and reject them is
the queue is exceeds a limit

This allows Spring Boot to schedule blocking tasks as before and allows
greater flexibility.

Fixes gh-18269
See gh-18276
5 years ago
Andy Wilkinson b15e427a3e Improve handling of non-standard status codes in WebFluxTags
Closes gh-18267
5 years ago
Andy Wilkinson 1b237de5f5 Use Awaitility in our own tests
Closes gh-18227
5 years ago
wonwoo b321dacc1c Fix typo in javadoc
See gh-18187
5 years ago
Andy Wilkinson e8de5a6d95 Provide a public API for determining a request's outcome
Closes gh-18150
5 years ago
dreis2211 a2a672de0e Improve handling of non-standard status codes in WebMvcTags
See gh-17998
5 years ago
Andy Wilkinson 58eddb8fa4 Become compatible with Jackson 2.10 while remaining 2.9 compatible
See gh-17999
5 years ago
Phillip Webb 75a6397b52 Merge branch '2.1.x'
Closes gh-18110
5 years ago
Phillip Webb e8d9b6f498 Polish "Fallback to ping if Solr URL references core"
See gh-16477
5 years ago
Markus Schuch b9764e8de8 Fallback to ping if Solr URL references core
Update `SolrHealthIndicator` to fallback to a basic ping operation if
the `baseUrl` references a particular core rather than the root context.

Prior to this commit, if the Solr `baseUrl` pointed to a particular
core then the health indicator would incorrectly report `DOWN`.

See gh-16477
5 years ago
dreis2211 b4350a9d96 Remove unnecessary blank lines
See gh-18089
5 years ago
Andy Wilkinson 82ea3b51b3 Polish 5 years ago
Andy Wilkinson 0217de4349 Polish "Improve handling of non-standard status codes in RestTemplate metrics"
See gh-17991
5 years ago
Johnny Lim 1acff410a2 Improve handling of non-standard status codes in RestTemplate metrics
See gh-17991
5 years ago
Madhura Bhave 7829593746 Polish "Sanitize password in URI properties"
See gh-17939
5 years ago
HaiTao Zhang d49a2ec98e Sanitize password in URI properties
See gh-17939
5 years ago
Andy Wilkinson b54ff7c45f Merge branch '2.1.x'
Closes gh-17950
5 years ago
Andy Wilkinson 608228d617 Improve handling of non-standard status codes in WebClient metrics
Fixes gh-17695
5 years ago
Andy Wilkinson b43827d626 Configure ping (formerly application) health indicator by default
This commit renames ApplicationHealthIndicator to PingHealthIndicator
and changes the auto-configuration so that it is now always configured
by default.

Closes gh-17926
5 years ago
Phillip Webb e03f822c6d Add support for health indicator groups
Update the `HealthEndpoint` to support health groups. The
`HealthEndpointSettings` interface has been replaced with
`HealthEndpointGroups` which provides access to the primary group
as well as an optional set of additional groups.

Groups can be configured via properties and may have custom
`StatusAggregator` and `HttpCodeStatusMapper` settings.

Closes gh-14022

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
5 years ago
Phillip Webb 3c535e0de3 Add HealthContributor and refactor HealthEndpoint
Overhaul `HealthEndpoint` support to make it easier to support health
groups. Prior to this commit the `HealthIndicator` interface was used
for both regular indicators and composite indicators. In addition the
`Health` result was used to both represent individual, system and
composite health. This design unfortunately means that all health
contributors need to be aware of the `HealthAggregator` and could not
easily support heath groups if per-group aggregation is required.

This commit reworks many aspects of the health support in order to
provide a cleaner separation between a `HealthIndicator`and a
composite. The following changes have been made:

- A `HealthContributor` interface has been introduced to represent
  the general concept of something that contributes health information.
  A contributor can either be a `HealthIndicator` or a
  `CompositeHealthContributor`.

- A `HealthComponent` class has been introduced to mirror the
  contributor arrangement. The component can be either
  `CompositeHealth` or `Health`.

- The `HealthAggregator` interface has been replaced with a more
  focused `StatusAggregator` interface which only deals with `Status`
  results.

- `CompositeHealthIndicator` has been replaced with
  `CompositeHealthContributor` which only provides access to other
  contributors. A composite can no longer directly return `Health`.

- `HealthIndicatorRegistry` has been replaced with
  `HealthContributorRegistry` and the default implementation now
  uses a copy-on-write strategy.

- `HealthEndpoint`, `HealthEndpointWebExtension` and
  `ReactiveHealthEndpointWebExtension` now extend a common
  `HealthEndpointSupport` class. They are now driven by a
  health contributor registry and `HealthEndpointSettings`.

- The `HealthStatusHttpMapper` class has been replaced by a
  `HttpCodeStatusMapper` interface.

- The `HealthWebEndpointResponseMapper` class has been replaced
  by a `HealthEndpointSettings` strategy. This allows us to move
  role related logic and `ShowDetails` to the auto-configure module.

- `SimpleHttpCodeStatusMapper` and `SimpleStatusAggregator`
  implementations have been added which are configured via constructor
  arguments rather than setters.

- Endpoint auto-configuration has been reworked and the
  `CompositeHealthIndicatorConfiguration` class has been replaced
  by `CompositeHealthContributorConfiguration`.

- The endpoint JSON has been changed make `details` distinct from
  `components`.

See gh-17926
5 years ago
Brian Clozel e7c3ab3e27 Rename WebFlux response body methods
This commit adapts to recent changes in Spring Framework.
See spring-projects/spring-framework#23212
5 years ago
Andy Wilkinson cc3df98135 Merge branch '2.1.x' 5 years ago
Andy Wilkinson ab87b2a39b Polish 5 years ago
Stephane Nicoll 6f28f41774 Polish "Simplify some code"
See gh-17860
5 years ago
jason 4bb842343a Simplify some code
See gh-17860
5 years ago
lijuny d8baefc38a Simplify some code
See gh-17834
5 years ago
lijuny 844a8d8027 Simplify some code
See gh-17832
5 years ago
Stephane Nicoll 71cf0a3ec8 Merge branch '2.1.x'
Closes gh-17812
5 years ago
Stephane Nicoll 994f08d234 Polish "Fix annotation lookup on proxied EndpointExtension"
See gh-17807
5 years ago
Jacques-Etienne Beaudet 9083da2876 Fix annotation lookup on proxied EndpointExtension
See gh-17807
5 years ago
Phillip Webb 105df823ee Polish 5 years ago
Phillip Webb 2cdceb92bf Polish 5 years ago
Phillip Webb da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
5 years ago
Phillip Webb 890ea153bf Allow endpoint @Selector to capture all paths
Update `@Selector` with a `match` attribute that can be used to select
all remaining path segments. An endpoint method like this:

	 select(@Selector(match = Match.ALL_REMAINING) String... selection)

Will now have all reaming path segments injected into the `selection`
parameter.

Closes gh-17743
5 years ago
Madhura Bhave 61b86ff231 Polish "Add support for configuring logging groups"
See gh-17515

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
HaiTao Zhang b9047c22e0 Add support for configuring logging groups via endpoint
See gh-17515
5 years ago
Stephane Nicoll 6756385049 Merge branch '2.1.x'
Closes gh-17664
5 years ago
Stephane Nicoll 6356852e2f Polish "Log health check failure with Reactive health indicators"
See gh-17635
5 years ago
Dmytro Nosan fe1b9c9501 Log health check failure with Reactive health indicators
See gh-17635
5 years ago
dreis2211 eb9527a170 Fix deprecation warnings in spring-boot-actuator
See gh-17660
5 years ago
Phillip Webb 8bc780762a Merge branch '2.1.x' 5 years ago
Phillip Webb fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 5 years ago
Phillip Webb 913e831f4e Merge '1.5.x' into 2.0.x 5 years ago
Phillip Webb 6c0dbacfce Polish 5 years ago
Stephane Nicoll 94c35ae1de Polish "Make Actuator dedicated ConversionService configurable"
See gh-16449
5 years ago
Stephane Nicoll be988d7072 Polish "Add HealthIndicator for Hazelcast"
See gh-17499
5 years ago
Dmytro Nosan fca5a2b824 Add HealthIndicator for Hazelcast
See gh-17499
5 years ago
Phillip Webb a9ba7080ce Merge branch '2.1.x' 5 years ago
Phillip Webb fd67f7ba3f Merge branch '1.5.x' into 2.0.x 5 years ago
Stephane Nicoll 56ce2b8e3f Polish "Add metrics support for idle jdbc connections"
See gh-17504
5 years ago
ayudovin 9acc02b5cc Add metrics support for idle jdbc connections
See gh-17504
5 years ago