1567 Commits

Author SHA1 Message Date
Brian Clozel
fe807d6c0b Improve liveness/readiness health config
Prior to this commit, the application availability infrastructure
would mix the `AvailabilityState`, the `HealthIndicator` and the
`HealthGroup` concepts and would not align with the rest.

This commit auto-configures the livenessState and readinessState
health indicators with the relevant configuration properties.
Unlike other indicators, they are not enabled by default but might
be in future versions.

This also moves the `management.health.probes.enabled` property
to `management.endpoint.health.probes.enabled` since "probes" here
is not a health indicator but rather a configuration flag for the
health endpoint.

Finally, the probes auto-configuration is refined to automatically
add liveness and readiness indicators for the probes group if
they're not already present.

Closes gh-22107
2020-07-21 16:03:06 +02:00
Andy Wilkinson
b627918011 Polish "Optionally ignore routing data sources when creating DB health indicators"
See gh-22222
2020-07-07 09:42:36 +01:00
Julio Gomez Diaz
13d1d2393d Optionally ignore routing data sources when creating DB health indicators
See gh-22222
2020-07-07 09:36:06 +01:00
Andy Wilkinson
b356bc830d Merge branch '2.3.x' 2020-07-06 09:47:08 +01:00
Andy Wilkinson
dfea2f432a Polish
See gh-21921
2020-07-06 09:41:39 +01:00
Brian Clozel
3f93978e99 Merge branch '2.3.x'
Closes gh-22215
2020-07-03 15:52:35 +02:00
Brian Clozel
86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
2020-07-03 15:25:18 +02:00
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
2020-07-03 15:16:38 +02:00
Andy Wilkinson
d85774ea77 Merge branch '2.3.x'
Closes gh-22196
2020-07-02 09:32:11 +01:00
Eddú Meléndez
54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
2020-07-01 14:03:11 +01:00
Andy Wilkinson
77eb5f7794 Polish "Add StatsD transport protocol configuration option"
See gh-22125
2020-06-29 09:47:17 +01:00
Lee Dobryden
5d41f60e45 Add StatsD transport protocol configuration option
See gh-22125
2020-06-29 09:47:08 +01:00
Phillip Webb
efe84356b7 Merge branch '2.3.x'
Closes gh-22064
2020-06-22 23:16:02 -07:00
Phillip Webb
03b0a373ab Merge branch '2.2.x' into 2.3.x
Closes gh-22063
2020-06-22 23:15:48 -07:00
Phillip Webb
e6eb02603c Polish 'Inherit show-details property in health groups'
Rework the inheritance so that the property metadata JSON more
accurately reflects the default value.

See gh-22022
2020-06-22 23:01:37 -07:00
Leo Li
10de88884f Inherit show-details property in health groups
Update `Group` properties so that the `showDetails` value does not
inherit `Show.NEVER`. Prior to this commit, the `Group` properties
would not correctly inherit a `showDetails` value from the main
`management.endpoint.health.show-details` property.

See gh-22022
2020-06-22 22:54:34 -07:00
Andy Wilkinson
9e08490522 Merge branch 'gh-21271'
Closes gh-21271
2020-06-16 12:52:17 +01:00
Andy Wilkinson
753bea64c6 Enable varargs compilation warnings
See gh-21271
2020-06-16 12:50:53 +01:00
Andy Wilkinson
9636350b0b Enable rawtypes compilation warnings
See gh-21271
2020-06-16 12:50:50 +01:00
Andy Wilkinson
056d5f3120 Enable deprecation compilation warnings
See gh-21271
2020-06-16 12:50:47 +01:00
Andy Wilkinson
07fb4b065d Merge branch '2.3.x'
Closes gh-21940
2020-06-16 10:10:38 +01:00
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
2020-06-16 08:50:21 +01:00
Stephane Nicoll
35e069e2cd Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
2020-06-15 11:13:13 +02:00
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
2020-06-15 11:13:13 +02:00
Scott Frederick
9ae6816785 Merge branch '2.3.x'
Closes gh-21874
2020-06-10 13:57:06 -05:00
Scott Frederick
7a793a11fb Merge branch '2.2.x' into 2.3.x
Fixes gh-21036 in 2.3.1
2020-06-10 13:55:12 -05:00
Scott Frederick
0fa1d0ef2e Handle bind exceptions in management context
This commit updates the logic for handling binding exceptions in the
management context when it is separate from the application context.
The changes allow the exception details to be visible to
DefaultErrorAttributes without causing the servlet container to
detect an error condition.

Fixes gh-21036
2020-06-10 13:53:04 -05:00
Phillip Webb
8a7a5929ae Merge branch '2.3.x' 2020-06-05 15:37:33 -07:00
Phillip Webb
cc50605687 Merge branch '2.2.x' into 2.3.x 2020-06-05 15:36:44 -07:00
Phillip Webb
0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Stephane Nicoll
da5e8d70a1 Polish "Support filtered scrape for Prometheus"
See gh-21545
2020-06-05 14:16:42 +02:00
Johnny Lim
cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
2020-06-05 14:16:42 +02:00
Andy Wilkinson
24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
2020-06-04 20:25:29 +01:00
Andy Wilkinson
daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
2020-06-03 12:55:11 +01:00
Madhura Bhave
d3f72326d0 Merge branch '2.2.x' into 2.3.x
Closes gh-21642
2020-06-01 13:49:59 -07:00
Madhura Bhave
573cb98d90 Make management security configuration back off when SAML present
Fixes gh-21620
2020-06-01 13:39:46 -07:00
Stephane Nicoll
069c31a074 Map connection and read timeouts for New Relic again
Closes gh-21440
2020-05-26 15:20:33 +02:00
Phillip Webb
fd505e516f Merge branch '2.2.x'
Closes gh-21444
2020-05-13 19:11:29 -07:00
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
2020-05-13 19:10:54 -07:00
Phillip Webb
038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Phillip Webb
12381467da Polish 2020-05-13 16:48:51 -07:00
Phillip Webb
6a1f61c1bf Merge branch '2.2.x' 2020-05-13 12:23:10 -07:00
Phillip Webb
5157a75119 Polish 2020-05-13 11:36:02 -07:00
Stephane Nicoll
23c5549832 Polish 2020-05-13 15:39:44 +02:00
Andy Wilkinson
a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
2020-05-13 08:16:59 +01:00
Madhura Bhave
376098d080 Set asciidoctor revnumber to null
Closes gh-20934
2020-05-12 14:58:38 -07:00
Scott Frederick
0d00947735 Closes gh-21428 2020-05-12 13:50:16 -05:00
Scott Frederick
6b8d08a6e3 Handle exceptions in management context
Prior to this commit, details about an exception would get dropped when
the management context was separate from the application context and
an actuator endpoint threw a binding exception.

This commit adds some logic to capture the exception so the management
context error handlers can add the appropriate attributes to the error
response.

Fixes gh-21036
2020-05-12 11:44:28 -05:00
Scott Frederick
158933c3e5 Improve API of ErrorAttributes and DefaultErrorAttributes
This commit improves the backward-compatibility of the ErrorAttributes
interfaces by providing a default implementation of a new method. It
also encapsulates several parameters that control the inclusion or
exclusion of error attributes into a new ErrorAttributeOptions type to
make it easier and less intrusive to add additional options in the
future. This encapsulation also makes the handling of the
includeException option more similar to other options.

Fixes gh-21324
2020-05-11 15:36:24 -05:00
Andy Wilkinson
f6d8c7d23c Simplify ReactiveWebServerApplicationContext.ServerManager
Closes gh-21315
2020-05-05 15:04:09 +01:00