1567 Commits

Author SHA1 Message Date
Stephane Nicoll
62ebe9c006 Adapt to Wavefront SDK 2.1
Closes gh-20854
2020-04-10 11:56:42 +02:00
Stephane Nicoll
d571fb311f Add support for NewRelicClientProvider
Closes gh-20908
2020-04-10 11:34:19 +02:00
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
2020-04-08 20:24:32 +02:00
Phillip Webb
3ca896e63f Polish 2020-04-07 12:10:49 -07:00
Phillip Webb
d9fb4dd477 Don't use monospacing in documentation headings
Closes gh-20875
2020-04-07 11:08:57 -07:00
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
2020-04-06 18:32:06 +02:00
Stephane Nicoll
9543ab1ca9 Update default value for Wavefront's step size
See gh-20833
2020-04-06 18:06:59 +02:00
Stephane Nicoll
a8c026a558 Expose Prometheus#histogramFlavor property
Closes gh-20853
2020-04-06 18:06:59 +02:00
Stephane Nicoll
f64f5a0f55 Expose Elastic's pipeline and indexDateSeparator properties
Closes gh-20852
2020-04-06 18:06:59 +02:00
Stephane Nicoll
f293f6ad9b Expose AppOptics's floorTimes property
Closes gh-20850
2020-04-06 18:06:59 +02:00
Stephane Nicoll
888a81beba Migrate Kafka metrics to KafkaClientMetrics
Closes gh-20838
2020-04-06 16:45:56 +02:00
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
2020-04-06 16:45:56 +02:00
Stephane Nicoll
30201a40e0 Update SLA boundaries to use double
See https://github.com/micrometer-metrics/micrometer/pull/1909

Closes gh-20837
2020-04-06 16:45:56 +02:00
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
2020-04-06 16:45:56 +02:00
Stephane Nicoll
08533c79e0 Update default value for Datadog's default uri
See gh-20833
2020-04-06 10:19:12 +02:00
Stephane Nicoll
7ca6359b43 Remove PushRegistry's numThreads deprecated property
See gh-20835
2020-04-05 15:32:39 +02:00
Stephane Nicoll
a23700f323 Merge branch '2.2.x'
Closes gh-20845
2020-04-05 15:14:44 +02:00
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
2020-04-05 15:12:42 +02:00
Stephane Nicoll
72f2afe1f3 Merge branch '2.2.x'
Closes gh-20844
2020-04-05 14:59:52 +02:00
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
2020-04-05 14:57:25 +02:00
Stephane Nicoll
2815e6ee2d Remove deprecated Humio's repository property
Closes gh-20808
2020-04-02 11:34:44 +02:00
Andy Wilkinson
f238812cea Polish "Improve handling of non-existent path in disk space health check"
See gh-20580
2020-03-31 12:24:10 +01:00
Andreas Born
db565cfc3a Improve handling of non-existent path in disk space health check
See gh-20580
2020-03-31 12:24:10 +01:00
Phillip Webb
9a33a723fe Update copyright year of changed files 2020-03-23 14:15:08 -07:00
Phillip Webb
16b5ea3414 Update copyright year of changed files 2020-03-23 14:13:33 -07:00
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
2020-03-23 22:04:30 +01:00
Stephane Nicoll
34b71561d3 Merge branch '2.2.x'
Closes gh-20619
2020-03-23 14:22:56 +01:00
Stephane Nicoll
7be3db2d4d Merge branch '2.1.x' into 2.2.x
Closes gh-20618
2020-03-23 14:22:30 +01:00
Stephane Nicoll
bcce6f9f07 Document that Jackson is a required dependency of the Actuator
Closes gh-19564
2020-03-23 14:16:55 +01:00
dreis2211
ef9f1d39a3 Remove redundant MockitoAnnotations.initMocks()
See gh-20601
2020-03-22 08:43:50 +01:00
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
2020-03-20 23:54:00 +01:00
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
2020-03-19 14:11:00 +01:00
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
2020-03-19 14:11:00 +01:00
Andy Wilkinson
ef9960c69f Allow additional tags to be contributed to WebMvc and WebFlux defaults
Closes gh-20175
2020-03-13 09:38:29 +00:00
Johnny Lim
8526e66939 Polish
See gh-20498
2020-03-11 12:17:58 +01:00
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
2020-03-04 09:58:18 +01:00
Madhura Bhave
7634bfb179 Merge branch '2.2.x'
Closes gh-20340
2020-02-27 13:02:40 -08:00
dreis2211
4eaaf88b2d Remove redundant code
See gh-20339
2020-02-27 12:56:43 -08:00
Madhura Bhave
5bf1f7641b Merge branch '2.2.x' 2020-02-26 17:08:59 -08:00
Madhura Bhave
ea8f2a7276 Fix tests following changes to EndpointRequest
See gh-20329
2020-02-26 17:05:16 -08:00
Madhura Bhave
250493d681 Merge branch '2.2.x'
Closes gh-20331
2020-02-26 15:00:49 -08:00
Madhura Bhave
cdae79dad9 Cache management port type in EndpointRequestMatcher
Closes gh-20329
2020-02-26 14:59:54 -08:00
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>
2020-02-25 09:22:57 -05:00
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>
2020-02-25 09:22:31 -05:00
Brian Clozel
ab72cc8fdb Revert "Add actuator specific ObjectMapper"
See gh-12951
See gh-20291
2020-02-21 17:16:24 +01:00
Stephane Nicoll
d65e06081f Update copyright year of changed files
See gh-20226
2020-02-19 09:35:28 +01:00
Johnny Lim
8be8a8421d Polish
See gh-20226
2020-02-19 09:34:46 +01:00
Stephane Nicoll
a6fdbdcd80 Merge branch '2.2.x'
Closes gh-20178
2020-02-14 10:26:39 +01:00
Dave Syer
dcaaf9785f Remove duplicate auto-configuration class
See gh-20168
2020-02-14 10:25:19 +01:00
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
2020-02-12 20:10:25 +01:00