Commit Graph

1325 Commits (434d4a6f76388ce42c88c6ba9f2e40656c78a242)

Author SHA1 Message Date
Brian Clozel 1152a39caa Polish 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
Stephane Nicoll f8bc656921 Polish "Removed some redundant 'else's using early return"
See gh-22528
4 years ago
Pradipta Sarma 2627bf896e Removed some redundant 'else's using early return
See gh-22528
4 years ago
Andy Wilkinson 627ede8bff Remove duplicate jackson-datatype-jsr310 dependency
Closes gh-23123
4 years ago
Phillip Webb aa2580bb51 Merge branch '2.3.x' 4 years ago
Phillip Webb ba2ab3363b Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb 60b5de192c Merge branch '2.2.x' into 2.3.x 4 years ago
Phillip Webb 4e76138ebc Update copyright year of changed files 4 years ago
Phillip Webb 9460d74e8a Rename CompositeMeterRegistryAutoConfiguration
Rename `CompositeMeterRegistryAutoConfiguration` to
`MeterRegistryAutoConfiguration` since it can also create non-composite
registries.

Closes gh-22988
4 years ago
Phillip Webb 12bae2ad52 Merge branch '2.3.x'
Closes gh-22990
4 years ago
Phillip Webb ff36f8bab8 Merge branch '2.2.x' into 2.3.x
Closes gh-22989
4 years ago
Phillip Webb 10da595302 Polish 'Order metrics auto-configurations correctly'
See gh-21134
4 years ago
Martin Benda 02b7ec787e Order metrics auto-configurations correctly
Update metrics auto-configurations so that they are auto-configured
after `CompositeMeterRegistryAutoConfiguration` in order to ensure
the `MeterRegistry` bean has been defined.

Prior to this commit, metrics auto-configurations that depended on a
`MeterRegistry` has `@AutoConfigureAfter(MetricsAutoConfiguration.class)`
which is not sufficient since `MetricsAutoConfiguration` does not export
a `MeterRegistry`.

See gh-21134
4 years ago
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
4 years ago
Stephane Nicoll 42ca62b2e7 Merge branch '2.3.x'
Closes gh-22931
4 years ago
Stephane Nicoll df78105a3c Merge branch '2.2.x' into 2.3.x
Closes gh-22930
4 years ago
Stephane Nicoll f61a632a37 Polish "Fix conditions that lead to auto-configure PushGateway"
See gh-22919
4 years ago
smlc c355b95f6c Fix conditions that lead to auto-configure PushGateway
See gh-22919
4 years ago
Stephane Nicoll 14eb041086 Polish "Add basic auth support for Prometheus pushgateway"
See gh-22548
4 years ago
AndrewDi 9ddc97f815 Add basic auth support for Prometheus pushgateway
See gh-22548
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 abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
4 years ago
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
4 years ago
Andy Wilkinson 0ffe51bb62 Merge branch '2.3.x'
Closes gh-22820
4 years ago
Andy Wilkinson be32843dab Configure generated snippets as inputs to the Asciidoctor tasks
Closes gh-22819
4 years ago
Madhura Bhave 6d82e9e97f Merge branch '2.3.x'
Closes gh-22775
4 years ago
Madhura Bhave 3f82ca40e2 Merge branch '2.2.x' into 2.3.x
Closes gh-22774
4 years ago
Madhura Bhave f39f33bb8d Fix documentation related to the health endpoint's inner details
Closes gh-22490
4 years ago
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 4 years ago
Stephane Nicoll dac63fc3e5 Polish 4 years ago
Andy Wilkinson 0e83b2f4c4 Merge branch '2.3.x'
Closes gh-22747
4 years ago
Andy Wilkinson c40835eba0 Merge branch '2.2.x' into 2.3.x
Closes gh-22746
4 years ago
Andy Wilkinson 71ffb44a3c Remove WebClient's in-memory buffer size limit for endpoint tests
Previously, the endpoints' responses could occasionally exceed
WebClient's in-memory buffer limt, for example if the threads endpoint
was reporting a large number of threads or the threads had large
stacks.

This commit disables WebClient's in-memory buffer size limit so that
the tests passing is not dependent on the size of the endpoints'
responses.

Closes gh-22743
4 years ago
Stephane Nicoll 516582f6d3 Merge branch '2.3.x'
Closes gh-22744
4 years ago
Andy Wilkinson bc44cd6705 Polish 4 years ago
Andy Wilkinson 7f53aef568 Upgrade to Kafka 2.6.0
Closes gh-22731
4 years ago
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
4 years ago
Brian Clozel 6efff7b585 Merge branch '2.3.x'
Closes gh-22698
4 years ago
Brian Clozel 8dedeb4c6a Fix missing liveness and readiness indicators
Prior to this commit, the livenessState and readinessState health
indicators would not be configured automatically and would be missing
from the "liveness" and "readiness" health groups, leading to 404s when
hitting the `/actuator/health/liveness` or `/actuator/health/readiness`.

This commit ensures that the health indicators beans have the proper
name and revisits the auto-configuration conditions to reflect that as
well.

Fixes gh-22562
4 years ago
Madhura Bhave 4b2c94cb2b Allow exclude only health groups
Closes gh-22053
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 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
Andy Wilkinson ce7210c4f0 Merge branch '2.1.x' into 2.2.x
Closes gh-22563
4 years ago
Nelson Osacky 585aed8f8f Add generated-snippets as output to test goal
The generated snippets were not declared as an output to the
`spring-boot-actuator-autoconfigure` test goal so when the test was
pulled from the cache, it did not contain the `generated-snippets`
directory. This directory is required as an input to the Asciidoctor
plugin.

See gh-22555
4 years ago
Stephane Nicoll 42155321cb Merge branch '2.3.x'
Closes gh-22561
4 years ago
Stephane Nicoll 7ed54bda96 Fix typo for management.health.readinessstate.enabled
Closes gh-22560
4 years ago
Stephane Nicoll 3530ac9b0c Polish "Disable metrics export in integration tests"
See gh-21658
4 years ago
bono007 b1830da0da Disable metrics export in integration tests
This commit introduces a new property to globally disable metrics
export. In integration tests, this property is automatically set to
disable everything but in-memory metrics.

This commit also introduces a `@AutoConfigureMetrics` annotation that
can be used for integration tests that require metrics export to operate
as they would in an application.

See gh-21658
4 years ago
Phillip Webb 3d7d9d064c Update copyright year of changed files 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 8799033801 Merge branch '2.3.x' 4 years ago
Andy Wilkinson 2063c242ae Polish 4 years ago
Brian Clozel 1d95e2f504 Merge branch '2.3.x'
Closes gh-22483
4 years ago
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
4 years ago
Andy Wilkinson b627918011 Polish "Optionally ignore routing data sources when creating DB health indicators"
See gh-22222
4 years ago
Julio Gomez Diaz 13d1d2393d Optionally ignore routing data sources when creating DB health indicators
See gh-22222
4 years ago
Andy Wilkinson b356bc830d Merge branch '2.3.x' 4 years ago
Andy Wilkinson dfea2f432a Polish
See gh-21921
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 d85774ea77 Merge branch '2.3.x'
Closes gh-22196
4 years ago
Eddú Meléndez 54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
4 years ago
Andy Wilkinson 77eb5f7794 Polish "Add StatsD transport protocol configuration option"
See gh-22125
4 years ago
Lee Dobryden 5d41f60e45 Add StatsD transport protocol configuration option
See gh-22125
4 years ago
Phillip Webb efe84356b7 Merge branch '2.3.x'
Closes gh-22064
4 years ago
Phillip Webb 03b0a373ab Merge branch '2.2.x' into 2.3.x
Closes gh-22063
4 years ago
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
4 years ago
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
4 years ago
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
4 years ago
Andy Wilkinson 753bea64c6 Enable varargs compilation warnings
See 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 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 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
Scott Frederick 9ae6816785 Merge branch '2.3.x'
Closes gh-21874
5 years ago
Scott Frederick 7a793a11fb Merge branch '2.2.x' into 2.3.x
Fixes gh-21036 in 2.3.1
5 years ago
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
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
Stephane Nicoll da5e8d70a1 Polish "Support filtered scrape for Prometheus"
See gh-21545
5 years ago
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
5 years ago
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
5 years ago
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
5 years ago
Madhura Bhave d3f72326d0 Merge branch '2.2.x' into 2.3.x
Closes gh-21642
5 years ago
Madhura Bhave 573cb98d90 Make management security configuration back off when SAML present
Fixes gh-21620
5 years ago
Stephane Nicoll 069c31a074 Map connection and read timeouts for New Relic again
Closes gh-21440
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
Phillip Webb 12381467da Polish 5 years ago
Phillip Webb 6a1f61c1bf Merge branch '2.2.x' 5 years ago
Phillip Webb 5157a75119 Polish 5 years ago
Stephane Nicoll 23c5549832 Polish 5 years ago
Andy Wilkinson a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
5 years ago
Madhura Bhave 376098d080 Set asciidoctor revnumber to null
Closes gh-20934
5 years ago
Scott Frederick 0d00947735 Closes gh-21428 5 years ago
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
5 years ago
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
5 years ago
Andy Wilkinson f6d8c7d23c Simplify ReactiveWebServerApplicationContext.ServerManager
Closes gh-21315
5 years ago
Phillip Webb d52bf83ab2 Polish 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 d16074d8fd Bind and unbind Kafka metrics as consumers and producers come and go
Fixes gh-21008

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
dreis2211 c1c90b11b8 Fix some deprecations
See gh-21212
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
Brian Clozel dfdee3e00e Revert "Add support for Reactor Netty Micrometer metrics"
This commit removes the support for Reactor Netty metrics since it
seems that Spring Boot should not use this feature:

* HTTP metrics are already covered by WebFlux
* TCP metrics are only meant to TCP server/clients
* allocator metrics are already provided by Netty and there is
no specific API to enable them here.

Closes gh-19388
5 years ago
Brian Clozel 956afdcf97 Add support for Reactor Netty Micrometer metrics
This commit enables the production of TCP and buffer allocator metrics
for Reactor Netty, client and server.

When applications use auto-configured server
(`NettyReactiveWebServerFactory`) and client (through
`WebClient.Builder`) instances, metrics will be enabled.

Note that HTTP metrics are not enabled here, since similar metrics are
already produced at the WebFlux level. Also, to avoid cardinality
explosion of metrics (through the URI tag), Reactor Netty offers
configurable infrastructure to deduplicate URI tags by turning expanded
URI instances into templated URIs. This is not targeted for Spring
usage.

Closes gh-19388
5 years ago
Johnny Lim ef567388c1 Polish
See gh-21110
5 years ago
dreis2211 667033c149 Fix Actuator API PDF name
See gh-21054
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
Stephane Nicoll ddcd1bc7bb Remove metadata for configuration keys that were removed in 2.0
Closes gh-19706
5 years ago
Stephane Nicoll 623fbcbf8c Polish 5 years ago
Stephane Nicoll 1019dbbc47 Merge branch '2.2.x'
Closes gh-21100
5 years ago
Stephane Nicoll 8ac3ab5551 Add missing metadata for removed configuration keys
Closes gh-20846
5 years ago
Stephane Nicoll 6c02daf2bc Merge branch '2.2.x'
Closes gh-21098
5 years ago
Stephane Nicoll 311952730e Merge branch '2.1.x' into 2.2.x
Closes gh-21097
5 years ago
Stephane Nicoll 291165f060 Order additional metadata according to lexicographic order
Closes gh-21095
5 years ago
Andy Wilkinson d05c973e71 Polish 5 years ago
Stephane Nicoll fe90b2a251 Rename Service Level Agreement to Service Level Objective
This commit harmonizes our integration of Micrometer's Service Level
objectives.

Closes gh-21076
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
Andy Wilkinson ab82e59aa1 Polish "Improve property name in thrown Micrometer ValidationException"
See gh-21069
5 years ago
Jon Schneider 507b062c43 Improve property name in thrown Micrometer ValidationException
See gh-21069
5 years ago
Stephane Nicoll f0fe7060df Polish 5 years ago
Phillip Webb bf41da5322 Update copyright year of changed files 5 years ago
Andy Wilkinson 60a76ce6e7 Polish "Update validation of Micrometer configuration"
See gh-21067
5 years ago
Jon Schneider 95798265b6 Update validation of Micrometer configuration
See gh-21067
5 years ago
Andy Wilkinson 8de0027757 Merge branch '2.2.x'
Closes gh-21062
5 years ago
Andy Wilkinson 3065c88d6f Fix typo in IncludeExcludeEndpointFilter's name
Closes gh-21061
5 years ago
Phillip Webb 49d20aea11 Merge branch '2.2.x'
Closes gh-21047
5 years ago
Phillip Webb df26e24605 Fix ConditionalOnAvailableEndpoint dashed matching
Update `ConditionalOnAvailableEndpoint` so that it now uses the same
matching code as the endpoint filter. This allows the condition to
match endpoint IDs that contain a dash.

In order to share logic, the `ExposeExcludePropertyEndpointFilter` class
has been deprecated and its logic moved to a new `expose` package
under `IncludExcludeEndpointFilter`. This filter is used by both the
`OnAvailableEndpointCondition` and the auto-configuration classes.

Fixes gh-21044
5 years ago
Stephane Nicoll 1eca70a84b Restore Graphite tags behaviour unless configured explicitly
This commit harmonizes how Graphite is configured. If tagsAsPrefix is
set, it is used transparently. Otherwise, the new native tagging system
is used.

See https://github.com/micrometer-metrics/micrometer/pull/2007

Closes gh-20884
5 years ago
Phillip Webb 0ad1ea4352 Merge branch '2.2.x' 5 years ago
Phillip Webb 83553ee504 Fix test checkstyle issues
Fix checkstyle issues from forward merge.

See gh-21022
5 years ago
Phillip Webb 2293cb1a41 Merge branch '2.2.x'
Closes gh-21023
5 years ago
Phillip Webb 5757c0864c Merge branch '2.1.x' into 2.2.x
Closes gh-21022
5 years ago
Phillip Webb 6a4d98a865 Allow exposure patterns to match dashed IDs
Update `ExposeExcludePropertyEndpointFilter` so that patterns will
also match endpoint IDs that contain a dash.

Closes gh-20997
5 years ago
Stephane Nicoll 90c0378a7d Apply configuration properties deprecation consistently
This commit makes sure that both the getter and the setter of a
deprecated configuration properties is flagged with `@Deprecated`.

Closes gh-20812
5 years ago
Phillip Webb e3b8478621 Polish 5 years ago