Commit Graph

1673 Commits (089fef039205f14c19d37d0d7fad9597cd71a584)

Author SHA1 Message Date
Stephane Nicoll d24720d958 Polish "Expose OS information as an InfoContributor"
See gh-28907
3 years ago
Jonatan Ivanov c700f686c6 Expose OS information as an InfoContributor
See gh-28907
3 years ago
izeye 728206dba0 Polish GraphQL changes
See gh-29140
Closes gh-29194
3 years ago
Stephane Nicoll e10b582a09 Merge branch '2.7.x' 3 years ago
Stephane Nicoll a20f959fbc Merge branch '2.6.x' into 2.7.x 3 years ago
Stephane Nicoll c469c41127 Merge branch '2.5.x' into 2.6.x 3 years ago
Stephane Nicoll 04ce0e65cd Polish assertion 3 years ago
Stephane Nicoll 09486b8fc7 Merge branch '2.7.x' 3 years ago
Stephane Nicoll 2b140950e3 Merge branch '2.6.x' into 2.7.x
Closes gh-29176
3 years ago
izeye 7fbb5749d1 Polish
See gh-29157
3 years ago
Brian Clozel 88ee4fab36 Polish
See gh-29140
3 years ago
Brian Clozel f61c87c3a7 Revert "Merge branch '2.7.x'"
This reverts commit f0677a119c, reversing
changes made to 938d58f32c.
3 years ago
Brian Clozel f0677a119c Merge branch '2.7.x' 3 years ago
Brian Clozel a7839bc9b9 Add Metrics support for Spring GraphQL
This commit adds the required infrastructure for instrumenting the
GraphQL engine and datafetchers in order to collect metrics.

With this infrastructure, we can collect metrics such as:

* "graphql.request", a timer for GraphQL query
* "graphql.datafetcher", a timer for GraphQL datafetcher calls
* "graphql.request.datafetch.count", a distribution summary of
  datafetcher count per query
* "graphql.error", an error counter

See gh-29140
3 years ago
Stephane Nicoll 2d7e478a55 Merge branch '2.7.x' 3 years ago
Stephane Nicoll 4fa0e87ba1 Merge branch '2.6.x' into 2.7.x 3 years ago
Stephane Nicoll efa93506e6 Fix checkstyle violations 3 years ago
Madhura Bhave 1c17a851b7 Merge branch '2.7.x' into main 3 years ago
Madhura Bhave d803c53e02 Merge branch '2.6.x' into 2.7.x
Closes gh-29109
3 years ago
Madhura Bhave 4cc8012bfa Handle WebServerNamespace in CachingOperationInvoker
Fixes gh-28882
3 years ago
Phillip Webb 003fb229fd Merge branch '2.7.x' 3 years ago
Andy Wilkinson 3c8d4d33e1 Upgrade to Spring Data Elasticsearch 7.16.0
Closes gh-28987
3 years ago
Stephane Nicoll c83ab9bbc5 Merge branch '2.7.x' 3 years ago
Stephane Nicoll 89635eafa3 Update copyright year of changed files
See gh-28862
3 years ago
Stefano Cordio a5c56043b9 Simplify AssertJ usage
See gh-28862
3 years ago
Andy Wilkinson fe7b13ec46 Upgrade to Spring Framework 6 and Jakarta EE 9
Closes gh-28619
Closes gh-28620
Closes gh-28621
Closes gh-28622
Closes gh-28623
Closes gh-28624
Closes gh-28625
Closes gh-28626
Closes gh-28627
Closes gh-28628
Closes gh-28629
Closes gh-28630
Closes gh-28631
Closes gh-28632
Closes gh-28633
Closes gh-28634
Closes gh-28635
Closes gh-28636
Closes gh-28638
Closes gh-28639
Closes gh-28640
Closes gh-28644
Closes gh-28645
Closes gh-28650
Closes gh-28711
Closes gh-28866
Closes gh-28867
Closes gh-28868
Closes gh-28872

See gh-28641
See gh-28642
See gh-28643
See gh-28646
See gh-28647
See gh-28648
See gh-28649
See gh-28721
See gh-28869
See gh-28871
3 years ago
Andy Wilkinson 8bf2ffd93c Drop support for Jersey until jersey-spring6 is available
Closes gh-28808
3 years ago
Scott Frederick 29a21d4621 Remove support for Spring Data Couchbase and Couchbase caching
Fixes gh-28613
3 years ago
Andy Wilkinson 64bf33038d Remove support for EhCache 2
Closes gh-28588
3 years ago
Stephane Nicoll 88aa849f90 Merge branch '2.5.x' 3 years ago
Stephane Nicoll 1bb3f906a7 Polish
See gh-28836
3 years ago
Stephane Nicoll 490ec8974d Merge branch '2.5.x'
Closes gh-28761
3 years ago
Stephane Nicoll 667bca05ec Polish "Add package info for Spring Data metrics support"
See gh-28756
3 years ago
charissathomas 42ae5114ef Create package-info.java
Closes #28731
3 years ago
Andy Wilkinson 2a342ef416 Merge branch '2.5.x'
Closes gh-28662
3 years ago
Andy Wilkinson 5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
3 years ago
Andy Wilkinson 2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
3 years ago
Andy Wilkinson e340429a1a Merge branch '2.5.x'
Closes gh-28469
3 years ago
Andy Wilkinson b375f9fac0 Ignore parameters when checking if */* is accepted
Previously the parameters were not ignored so */*;q=0.8 was not
identified as accepting */*. As a result, the most recent producible
content type was returned rather than the default.

This commit updates the argument resolver to ignore parameters.
The default content type is now produced in response to a request
that accepts */*, irrespective of its parameters.

Fixes gh-28446
3 years ago
Andy Wilkinson 3605388787 Merge branch '2.5.x'
Closes gh-28440
3 years ago
Andy Wilkinson 50d4eaad63 Merge branch '2.4.x' into 2.5.x
Closes gh-28439
3 years ago
Leo Li 1586232761 Polish
See gh-28367
3 years ago
Phillip Webb 37426df148 Merge branch '2.5.x'
Closes gh-28354
3 years ago
Phillip Webb cf8a1b8b04 Merge branch '2.4.x' into 2.5.x
Closes gh-28353
3 years ago
Phillip Webb b68b3737d7 Sanitize flattened VCAP_SERVICES properties
Update `Sanitizer` to also include flattened `vcap.services.*`
properties.

Fixes gh-28085
3 years ago
Phillip Webb 4da7d2a6a7 Merge branch '2.5.x'
Closes gh-28348
3 years ago
Phillip Webb 2430d8a41a Merge branch '2.4.x' into 2.5.x
Closes gh-28347
3 years ago
Phillip Webb 4dc5142128 Prevent cache from consuming too much memory
Change the cache in `CachingOperationInvoker` to be a reference based
map and also clean stale entries when a specific threshold is met.

Fixes gh-28313
3 years ago
Andy Wilkinson 84b553a8ca Upgrade to Jackson Bom 2.13.0
Closes gh-28298
3 years ago
Stephane Nicoll cc8d7fc605 Polish contribution
See gh-28239
3 years ago
Leo Li 1770f065a5 Polish
See gh-28239
3 years ago
Andy Wilkinson 1a505964ee Merge branch '2.5.x'
Closes gh-28207
3 years ago
Andy Wilkinson 1931104d13 Merge branch '2.4.x' into 2.5.x
Closes gh-28206
3 years ago
Andy Wilkinson 9c9fbf400e Upgrade to Spring Java Format 0.0.29
Closes gh-28205
3 years ago
dreis2211 c5088a3bd3 Avoid explicit initialization of Atomics with their default values
See gh-28162
3 years ago
Stephane Nicoll 5d17257a52 Polish "Add Java InfoContributor"
See gh-28136
3 years ago
Jonatan Ivanov fc87da7ef3 Add Java InfoContributor
See gh-28136
3 years ago
Andy Wilkinson 8aa9d0c13d Merge branch '2.5.x'
Closes gh-28198
3 years ago
Andy Wilkinson 437a1601ef Fix broken content negotiation for Prometheus with OpenMetrics
Update Prometheus `TextOutputFormat` so that OpenMetrics is used in
preference to text output when an appropriate accept header is found.

If the accept header contains `*/*` or is missing then the text format
will be used.

See gh-28130
3 years ago
Phillip Webb d8141e6a8d Allow Producible enums to indicate a default value
Add an `isDefault()` method to `Producible` which can be used to
indicate which of the enum values should be used when the accept header
is `*/*` or `null`.

Prior to this commit, the last enum value was always used as the
default.

See gh-28130
3 years ago
Madhura Bhave ef2a5daa59 Polish 3 years ago
Phillip Webb 1829dc4960 Merge branch '2.5.x'
Closes gh-28082
3 years ago
Phillip Webb a862ebc254 Merge branch '2.4.x' into 2.5.x
Closes gh-28081
3 years ago
Phillip Webb bbb4ac1542 Sanitize SPRING_APPLICATION_JSON by default
Update `Sanitizer` default keys to include `SPRING_APPLICATION_JSON`.

Fixes gh-28045
3 years ago
Phillip Webb 667e5ca30c Polish 3 years ago
Phillip Webb 98a0e07dd5 Polish "Add startup time metrics"
See gh-27878
3 years ago
Phillip Webb 55a1ec72cc Update copyright year of changed files 3 years ago
Phillip Webb 4c2c4ec16c Merge branch '2.5.x' 3 years ago
Phillip Webb 5ba69634c9 Merge branch '2.4.x' into 2.5.x 3 years ago
Phillip Webb dfd36673f7 Update copyright year of changed files 3 years ago
Phillip Webb cfeafee826 Polish 3 years ago
Stephane Nicoll 6c8c8502e3 Log failing calls to health indicators
Closes gh-22632

Co-authored-by: Madhura Bhave <bhavem@vmware.com>
3 years ago
dreis2211 cf0fcafd13 Polish
See gh-27940
3 years ago
Andy Wilkinson 36b7aa9948 Merge branch '2.5.x'
Closes gh-28070
3 years ago
Andy Wilkinson b2b691b1d0 Merge branch '2.4.x' into 2.5.x
Closes gh-28069
3 years ago
Andy Wilkinson c2361aeb04 Make WebMvcMetricsFilter set status consistently for all exceptions
Closes gh-27988
3 years ago
Stephane Nicoll 7957d97528 Polish 3 years ago
Stephane Nicoll c62a6819fe Polish "Add startup time metrics"
See gh-27878
3 years ago
bono007 2e67963bfe Add startup time metrics
See gh-27878
3 years ago
Stephane Nicoll b626adf1ee Polish "Add support for configuring the path of disk space metrics"
See gh-27660
3 years ago
bono007 08251b26d0 Add support for configuring the path of disk space metrics
See gh-27660
3 years ago
Stephane Nicoll 726a2591fb Start building against Micrometer 1.8.0-M3 snapshots
See gh-27931
3 years ago
Madhura Bhave 393081f2e6 Enable PathPattern based matching for MVC actuators
Closes gh-24645
3 years ago
Madhura Bhave 253f98c3e7 Add pluggable abstraction for applying custom sanitization rules
Closes gh-27840
3 years ago
Phillip Webb b1b3bdc9b1 Polish 3 years ago
Madhura Bhave 8fd9eb72d4 Allow part of a composite contributor in a health group
Closes gh-23027

Co-authored-by: Phillip Webb <pwebb@vmware.com>
3 years ago
Andy Wilkinson fd2fbcb3c6 Merge branch '2.5.x'
Closes gh-27758
3 years ago
Andy Wilkinson 6d8ba3e8b1 Merge branch '2.4.x' into 2.5.x
Closes gh-27757
3 years ago
Andy Wilkinson ffbd28b60a Polish "Polish access modifiers for test classes"
See gh-27736
3 years ago
izeye 8a425dedfd Polish access modifiers for test classes
See gh-27736
3 years ago
Andy Wilkinson fbeb5f19b7 Merge branch '2.5.x'
Closes gh-27636
3 years ago
Stephane Nicoll 57050fade4 Fix typo 3 years ago
Andy Wilkinson 35ea3b234d Prevent repository metrics from causing a circular reference
Fixes gh-27591
3 years ago
Madhura Bhave 49c86e6e1b Allow health groups to be configured at an additional path
Closes gh-25471

Co-authored-by: Phillip Webb <pwebb@vmware.com>
3 years ago
Stephane Nicoll 72433e8f53 Merge branch '2.5.x'
Closes gh-27617
3 years ago
Stephane Nicoll a393c2982c Merge branch '2.4.x' into 2.5.x
Closes gh-27616
3 years ago
Stephane Nicoll cd0bb969db Fix Potential NPE in TomcatMetricsBinder.findContext()
Closes gh-27576
3 years ago
Andy Wilkinson 64c0eceec7 Add support for dumping the heap on OpenJ9
Closes gh-26466
3 years ago
Andy Wilkinson 5163bdab22 Merge branch '2.5.x'
Closes gh-27489
3 years ago
Andy Wilkinson a71d19bce7 Merge branch '2.4.x' into 2.5.x
Closes gh-27488
3 years ago
Andy Wilkinson 388068cdff Polish "Sanitize URIs with non-alpha characters in their schemes"
See gh-27482
3 years ago
Billy Tobon bafa9c4784 Sanitize URIs with non-alpha characters in their schemes
See gh-27482
3 years ago
Andy Wilkinson 355226c21e Merge branch '2.5.x'
Closes gh-27474
3 years ago
Andy Wilkinson eaca9c7a83 Merge branch '2.4.x' into 2.5.x
Closes gh-27473
3 years ago
Andy Wilkinson ee07d6c3ca Increase response timeout for server-bound WebTestClients
Closes gh-27472
3 years ago
Phillip Webb 7e9ac39f0d Update copyright year of changed files 3 years ago
Andy Wilkinson 37f690323f Polish
Closes gh-27432
3 years ago
Andy Wilkinson bb26b7bdf5 Polish
Closes gh-27431
3 years ago
izeye 734293d491 Polish
See gh-27418
3 years ago
Andy Wilkinson c211c971f1 Polishing
Closes gh-27429
3 years ago
Andy Wilkinson 4a533e14c3 Merge branch '2.4.x' into 2.5.x
Closes gh-27428
3 years ago
dreis2211 4d0c98011e Polishing
See gh-27417
3 years ago
Andy Wilkinson 6f0b23502e Merge branch '2.5.x'
Closes gh-27347
3 years ago
Andy Wilkinson d4159130a5 Merge branch '2.4.x' into 2.5.x
Closes gh-27346
3 years ago
Andy Wilkinson 7a23a12ce0 Fix configprops endpoint's handling of config tree values
Fixes gh-27327
3 years ago
Andy Wilkinson e1049a55ff Avoid retrieving values from Record beyond session boundary
See gh-27294
3 years ago
Andy Wilkinson 9f9c89a357 Polish "Use server version from database in Neo4j health details"
See gh-27294
3 years ago
Gerrit Meier f7fd0ac527 Use server version from database in Neo4j health details
See gh-27294
3 years ago
Andy Wilkinson 8db63db564 Merge branch '2.5.x'
Closes gh-27333
3 years ago
Andy Wilkinson 9a81d2fe09 Merge branch '2.4.x' into 2.5.x
Closes gh-27332
3 years ago
Andy Wilkinson c005e1de9a Rename test classes to match our naming conventions
Closes gh-27331
3 years ago
Stephane Nicoll dc5acb0019 Remove deprecated code flagged for removal
Closes gh-27303
3 years ago
Madhura Bhave 111ea31036 Merge branch '2.5.x' into main 3 years ago
Madhura Bhave ed22e4a897 Merge branch '2.4.x' into 2.5.x 3 years ago
Madhura Bhave 23b377e1a1 Fix typo 3 years ago
Andy Wilkinson 9b82836f0e Merge branch '2.5.x'
Closes gh-27305
3 years ago
Andy Wilkinson 685b78f504 Merge branch '2.4.x' into 2.5.x
Closes gh-27304
3 years ago
Andy Wilkinson 49baacbc1c Polish "Mark Redis as down when cluster_state is fail"
See gh-27300
3 years ago
Hoan Vu Hong f31141de09 Mark Redis as down when cluster_state is fail
See gh-27300
3 years ago
Andy Wilkinson d21f8df1ad Polish "Auto-configure Jetty connection and SSL metrics"
See gh-26418
3 years ago
bono007 e6c43a32c8 Auto-configure Jetty connection and SSL metrics
See gh-26418
3 years ago
Stephane Nicoll c16ef0a006 Upgrade to Neo4j Java Driver 4.3.3
Closes gh-27278
3 years ago
Phillip Webb 2c518f1dff Merge branch '2.4.x' into 2.5.x 3 years ago
Phillip Webb a76e5c043e Update copyright year of changed files 3 years ago
Andy Wilkinson d635e1e779 Merge branch '2.4.x' into 2.5.x
Closes gh-26923
3 years ago
Andy Wilkinson fe078c8afc Avoid capturing URI template when interceptor won't use it
Previously, the URI template handler installed by the client metrics
interceptor would always capture the URI template and push it onto the
deque, irrespective of whether auto timing was enabled. When
auto-timing is disabled the deque is never polled so this led to its
unrestricted growth.

This commit updates the URI template handler so that a URI template is
only pushed onto the deque when the auto timing configuration enables
the interceptor.

Fixes gh-26915
3 years ago
Andy Wilkinson 866f1e34c1 Merge branch '2.4.x' into 2.5.x
Closes gh-26873
3 years ago
Andy Wilkinson 37d395bad2 Try to stabilize flaky MetricsWebClientFilterFunction test
Closes gh-26855
3 years ago
Andy Wilkinson c5728c9560 Merge branch '2.4.x'
Closes gh-26827
3 years ago
Andy Wilkinson 303edac6bb Merge branch '2.3.x' into 2.4.x
Closes gh-26826
3 years ago
Andy Wilkinson d1e1796f76 Consider overridden getRootUri() when getting root URI
Fixes gh-26812
3 years ago
Phillip Webb 850088de32 Merge branch '2.4.x'
Closes gh-26823
3 years ago
Phillip Webb d5264664e6 Merge branch '2.3.x' into 2.4.x
Closes gh-26822
3 years ago
Phillip Webb 1f6983c4c9 Make CompositeHealth.getDetails() public
Change `CompositeHealth.getDetails()` to public so that it serializes
correctly when `MapperFeature.CAN_OVERRIDE_ACCESS_MODIFIERS` is
disabled.

Fixes gh-26797
3 years ago
Stephane Nicoll 5ac5038176 Merge branch '2.4.x' 4 years ago
Stephane Nicoll aea8597114 Merge branch '2.3.x' into 2.4.x 4 years ago
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