Commit Graph

1155 Commits (ae4ebbe6857d76fd3682e2630f3c2e66c89a2bbe)

Author SHA1 Message Date
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
Scott Frederick f4c2714139 Support server.error config in management context
Prior to this commit, the ManagementErrorEndpoint used to handle error
responses for the management servlet excluded stacktrace and exception
message details from the response unconditionally.

With this commit, the endpoint honors the
`server.error.include-stacktrace` and `server.error.include-details`
properties to conditionally include error details for consistency
with non-management error handling.

Fixes gh-20989
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
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 f32a37e289 Support `management.health.probes.enabled=false`
Update `AvailabilityProbesAutoConfiguration` to allow the
`management.health.probes.enabled` property to override the platform
detection logic. Prior to this commit, it was possible to use the
property to enable the probes, but it was not possible to disable
them when deploying to Kubernates.

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
Vedran Pavic fec386b574 Harmonize naming of Elasticsearch auto-configuration classes 5 years ago
Stephane Nicoll 62ebe9c006 Adapt to Wavefront SDK 2.1
Closes gh-20854
5 years ago
Stephane Nicoll d571fb311f Add support for NewRelicClientProvider
Closes gh-20908
5 years ago
Stephane Nicoll 8cc61242e2 Use Micrometer's getDefaultSenderBuilder
This commit removes the duplication added temporarily in Spring Boot to
initialize a default WavefrontSender builder.

This commit also disables a test is failing at the moment, see
https://github.com/micrometer-metrics/micrometer/issues/1964

See gh-20854
5 years ago
Phillip Webb 3ca896e63f Polish 5 years ago
Phillip Webb d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
5 years ago
Stephane Nicoll 6764e5e2d0 Export metrics to Wavefront using WavefrontSender
This commit upgrades the Wavefront metrics export auto-configuration to
provide a `WavefrontSender` if necessary and use that to export metrics
rather than the http client Micrometer used previously.

As a result, the "read-timeout" and "connect-timeout" properties are no
longer honoured.

Closes gh-20810
5 years ago
Stephane Nicoll 9543ab1ca9 Update default value for Wavefront's step size
See gh-20833
5 years ago
Stephane Nicoll a8c026a558 Expose Prometheus#histogramFlavor property
Closes gh-20853
5 years ago
Stephane Nicoll f64f5a0f55 Expose Elastic's pipeline and indexDateSeparator properties
Closes gh-20852
5 years ago
Stephane Nicoll f293f6ad9b Expose AppOptics's floorTimes property
Closes gh-20850
5 years ago
Stephane Nicoll 888a81beba Migrate Kafka metrics to KafkaClientMetrics
Closes gh-20838
5 years ago
Stephane Nicoll 333ac279c3 Stop auto-configuring a StatsdMetrics bean
StatsD no longer publishes metrics about itself and StatsDMetrics is
deprecated as a result. This commit removes the auto-configuration of
it.

Closes gh-20836
5 years ago
Stephane Nicoll 30201a40e0 Update SLA boundaries to use double
See https://github.com/micrometer-metrics/micrometer/pull/1909

Closes gh-20837
5 years ago
Stephane Nicoll 4813606b70 Expose Graphite's graphiteTagsEnabled property
This commit exposes an additional property for Graphite that allows to
restore the previous default behaviour with regards to tags, i.e.
prefixing the ones defined by the "tagsAsPrefix" property.

Close gh-20834
5 years ago
Stephane Nicoll 08533c79e0 Update default value for Datadog's default uri
See gh-20833
5 years ago
Stephane Nicoll 7ca6359b43 Remove PushRegistry's numThreads deprecated property
See gh-20835
5 years ago
Stephane Nicoll a23700f323 Merge branch '2.2.x'
Closes gh-20845
5 years ago
Stephane Nicoll 1960c90d5f Deprecated PushRegistry's numThreads property
This property is a left-over and was never used in Micrometer so this
commit deprecates its use so that it can be removed in the next feature
release.

Closes gh-20835
5 years ago
Stephane Nicoll 72f2afe1f3 Merge branch '2.2.x'
Closes gh-20844
5 years ago
Stephane Nicoll 4641794fb5 Fix AtlasProperties hierarchy
This commit fixes the AtlasProperties hierarchy so that it no longer is
a StepRegistryProperties. The AtlasConfig on the Micrometer side of
things does not share the common config hierarchy either and some
properties have different default and lifecycle.

Closes gh-20843
5 years ago
Stephane Nicoll 2815e6ee2d Remove deprecated Humio's repository property
Closes gh-20808
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
Phillip Webb 9a33a723fe Update copyright year of changed files 5 years ago
Phillip Webb 16b5ea3414 Update copyright year of changed files 5 years ago
Brian Clozel 4be64e8f9c Add "management.health.probes.enabled" config property
Prior to this commit, we were relying on the
`"spring.main.cloud-platform"` property for overriding cloud platform
detection and enabling liveness and readiness probes. Changes made in
gh-20553 have now been reverted.

This commit adds the `"management.health.probes.enabled"` configuration
property. The auto-configuration now enables the HTTP Probes and
`HealthIndicator` if this property is enabled, or if the Kubernetes
cloud platform is detected.

This property is `false` by default for now, since enabling this for all
Spring Boot applications would be a breaking change. In this case, the
global `"/actuator/health"` endpoint could report `OUT_OF_SERVICE`
during startup time because the application now reports the readiness as
well.

See gh-19593
5 years ago
Stephane Nicoll 34b71561d3 Merge branch '2.2.x'
Closes gh-20619
5 years ago
Stephane Nicoll 7be3db2d4d Merge branch '2.1.x' into 2.2.x
Closes gh-20618
5 years ago
Stephane Nicoll bcce6f9f07 Document that Jackson is a required dependency of the Actuator
Closes gh-19564
5 years ago
dreis2211 ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
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
Andy Wilkinson ef9960c69f Allow additional tags to be contributed to WebMvc and WebFlux defaults
Closes gh-20175
5 years ago
Johnny Lim 8526e66939 Polish
See gh-20498
5 years ago
Stephane Nicoll 2d5a55fb0d Bind ConnectionPool beans that are exposed as ConnectionFactory
This commit relaxes the class condition to ConnectionFactory, checking
if the connection factory is a connection pool and bind its metrics to
the registry accordingly.

Closes gh-20349
5 years ago
Madhura Bhave 7634bfb179 Merge branch '2.2.x'
Closes gh-20340
5 years ago
dreis2211 4eaaf88b2d Remove redundant code
See gh-20339
5 years ago
Madhura Bhave 5bf1f7641b Merge branch '2.2.x' 5 years ago
Madhura Bhave ea8f2a7276 Fix tests following changes to EndpointRequest
See gh-20329
5 years ago
Madhura Bhave 250493d681 Merge branch '2.2.x'
Closes gh-20331
5 years ago
Madhura Bhave cdae79dad9 Cache management port type in EndpointRequestMatcher
Closes gh-20329
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 ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
5 years ago
Stephane Nicoll d65e06081f Update copyright year of changed files
See gh-20226
5 years ago
Johnny Lim 8be8a8421d Polish
See gh-20226
5 years ago
Stephane Nicoll a6fdbdcd80 Merge branch '2.2.x'
Closes gh-20178
5 years ago
Dave Syer dcaaf9785f Remove duplicate auto-configuration class
See gh-20168
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 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
dreis2211 2d9902f10e Fix link to Spring Integration Graph documentation
See gh-19992
5 years ago
Stephane Nicoll 90e3d88793 Fix link to Spring Integration Graph documentation
Closes gh-20023
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 0ddf8be151 Polish
See gh-20001
5 years ago
dreis2211 fac6f08ca3 Use new AssertJ duration assertions
See gh-19985
5 years ago