Commit Graph

2283 Commits

Author SHA1 Message Date
Andy Wilkinson 6580f6c742 Align with latest changes in Micrometer 1.9 snapshots
See gh-30605
2022-04-12 11:47:34 +01:00
Andy Wilkinson b871a1e457 Merge branch '2.7.x' 2022-04-12 08:51:47 +01:00
Andy Wilkinson 48f8021d88 Migrate @Local*Port annotations to spring-boot-test
Closes gh-29589
2022-04-12 08:48:43 +01:00
Andy Wilkinson 8d18e5fc0e Merge branch '2.7.x' 2022-04-11 15:23:10 +01:00
Andy Wilkinson b8b903527a Update tag keys to comply with Micrometer recommendations
Closes gh-30536
2022-04-11 15:21:35 +01:00
Andy Wilkinson 136189c86f Merge branch '2.7.x' 2022-04-08 14:05:07 +01:00
Andy Wilkinson f209d77cb2 Merge branch '2.6.x' into 2.7.x
Closes gh-30617
2022-04-08 14:04:43 +01:00
Andy Wilkinson d6731805b6 Merge branch '2.5.x' into 2.6.x
Closes gh-30616
2022-04-08 14:03:58 +01:00
Andy Wilkinson 70fa7e5e93 Make properties field final
Closes gh-30615
2022-04-08 14:03:29 +01:00
Stephane Nicoll 3e67ffd233 Merge branch '2.7.x' 2022-04-07 09:18:26 +02:00
Stephane Nicoll 245e602ae0 Merge branch '2.6.x' into 2.7.x
Closes gh-30573
2022-04-07 09:18:17 +02:00
luozhenyu 09daad0a16 Add metadata for management.endpoint.health.probes.add-additional-paths
See gh-30562
2022-04-07 09:14:02 +02:00
Moritz Halbritter 5ab9112bbc Add auto-configuration for Micrometer 2.0.0 Observation API
- Adds a ObservationRegistry bean
- Add support for ObservationRegistryCustomizers
- Enables timer creation for observations if micrometer-core is on
  the classpath
- Registers ObservationPredicate, GlobalTagsProvider and
  ObservationHandler on the MeterRegistry
- Applies grouping to the ObservationHandlers: MeterObservationHandler
  are added to a FirstMatchingCompositeObservationHandler
- If micrometer-tracing is on the classpath, the
  TracingObservationHandler are added to a
  FirstMatchingCompositeObservationHandler

Closes gh-29666
2022-04-05 13:57:31 +02:00
Moritz Halbritter 9791318e55 Merge branch '2.7.x' 2022-04-04 13:49:05 +02:00
Jonatan Ivanov d0bc31a5e9 Add support for Prometheus Exemplars
See gh-30472
2022-04-04 13:35:38 +02:00
Moritz Halbritter be3523b1cd Move metric properties
- Moved from 'management.metrics.export.<product>' to
  'management.<product>.metrics.export'
- The default enabled property moved from 'management.metrics.export.defaults.enabled'
  to 'management.defaults.metrics.export.enabled'

Closes gh-30381
2022-03-28 08:24:03 +02:00
Moritz Halbritter 3af3b26f8e Merge branch '2.7.x' 2022-03-25 16:28:38 +01:00
Moritz Halbritter 018281f3d0 Merge branch '2.6.x' into 2.7.x
Closes gh-30441
2022-03-25 16:28:24 +01:00
Moritz Halbritter cee51783fd Merge branch '2.5.x' into 2.6.x
Closes gh-30440
2022-03-25 16:28:07 +01:00
Moritz Halbritter 24e748d5cd Remove unnecessary entries in additional config metadata
Add the 'enabled' fields directly to the classes instead.

Closes gh-30439
2022-03-25 16:22:47 +01:00
Moritz Halbritter e431842668 Merge branch '2.7.x' 2022-03-25 14:56:49 +01:00
Moritz Halbritter 45f393b76b Merge branch '2.6.x' into 2.7.x
Closes gh-30437
2022-03-25 14:56:01 +01:00
Moritz Halbritter c003d5b533 Merge branch '2.5.x' into 2.6.x
Closes gh-30436
2022-03-25 14:55:31 +01:00
Moritz Halbritter 0ff8119a1b Sort entries in additional-spring-configuration metadata alphabetically
Closes gh-30434
2022-03-25 14:54:39 +01:00
Stephane Nicoll 2088381d4b Merge branch '2.7.x' 2022-03-21 10:06:56 +01:00
Jens Wilke 774f61fcb5 Add support for cache2k in memory caching
See gh-28498
2022-03-21 08:22:19 +01:00
Scott Frederick cabfb98a89 Merge branch '2.7.x' 2022-03-18 16:52:47 -05:00
Scott Frederick a14f3ed200 Use a ConfigurationProperties class for JMX properties
Closes gh-30327
2022-03-18 16:32:13 -05:00
Andy Wilkinson 997f7cbfce Merge branch '2.7.x' 2022-03-08 14:09:59 +00:00
Andy Wilkinson dfd4097436 Merge branch '2.6.x' into 2.7.x
Closes gh-30101
2022-03-08 14:09:47 +00:00
Andy Wilkinson 5b2cc74f71 Merge branch '2.5.x' into 2.6.x
Closes gh-30100
2022-03-08 14:09:35 +00:00
Andy Wilkinson 708e57eafb Register metrics for wrapped R2DBC ConnectionPools
Closes gh-30090
2022-03-08 13:55:34 +00:00
Moritz Halbritter 1793cee00f Start building against Micrometer 2.0.0-M3
See gh-29753
2022-03-04 11:03:22 +01:00
Andy Wilkinson bd0829a382 Merge branch '2.7.x' 2022-03-03 14:48:03 +00:00
Andy Wilkinson ff7321cc5a Polish "Support overriding the default SanitizingFunction"
See gh-30006
2022-03-03 14:24:51 +00:00
Guirong Hu fb9112c891 Support overriding the default SanitizingFunction
See gh-30006
2022-03-03 14:19:14 +00:00
Moritz Halbritter 0072cc807c Suppress deprecation warnings caused by micrometer backwards compatability 2022-03-01 14:00:27 +01:00
Moritz Halbritter 7897a913a7 Start building against Micrometer 1.9.0-M4 snapshots
Micrometer duplicated the binders in a separate module named
micrometer-binders, and marked the binders in the core module as
deprecated. This commit changes the imports to use the new binders in
the micrometer-binders module. Additionally, the auto-configurations
honor user-supplied beans which use the old binders in the
micrometer-core module.

See gh-30014
2022-03-01 09:20:07 +01:00
Phillip Webb 5454e2e26a Merge branch '2.7.x' 2022-02-23 23:02:59 -08:00
Phillip Webb 9f00c3acf5 Polish 2022-02-23 21:44:43 -08:00
Moritz Halbritter 54f1058d63 Merge branch '2.7.x' 2022-02-23 16:10:49 +01:00
Moritz Halbritter 9149ae50da Use @AutoConfiguration for relative ordering on auto-configurations 2022-02-23 15:39:46 +01:00
Moritz Halbritter 03e5dcdb3a Merge branch '2.7.x' 2022-02-21 13:34:11 +01:00
Moritz Halbritter 1325153ee9 Move ManagementContextConfiguration from spring.factories
The import selector will now, in addition to spring.factories, look for
ManagementContextConfiguration classes in a file called
META-INF/spring/org.springframework.boot.actuate.autoconfigure.web.ManagementContextConfiguration.imports

The existing ManagementContextConfigurations have been moved from
spring.factories to the new file.

Closes gh-29730
2022-02-21 13:16:12 +01:00
Moritz Halbritter d42f675959 Merge branch '2.7.x' 2022-02-21 10:36:05 +01:00
Moritz Halbritter d7b229d3c7 Rename AutoConfigurationLoader to ImportCandidates
Move the class to a more suitable package, and load the files from
META-INF/spring/<fqn>.imports

See gh-29872
2022-02-21 10:34:38 +01:00
Scott Frederick cb69d01e04 Merge branch '2.7.x' into main 2022-02-17 19:07:24 -06:00
Scott Frederick 42328771ad Suppress deprecation warnings for WebSecurityConfigurerAdapter
Fixes gh-29897
2022-02-17 19:06:13 -06:00
Moritz Halbritter 42808ff13c Merge branch '2.7.x'
# Conflicts:
#	spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/spring.factories
#	spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring.factories
#	spring-boot-project/spring-boot-test-autoconfigure/src/main/resources/META-INF/spring.factories
2022-02-17 10:56:23 +01:00
Moritz Halbritter 7c96294641 Move our auto-configurations from spring.factories to new file
Closes gh-29873
2022-02-17 10:18:46 +01:00
Moritz Halbritter 303979fb65 Merge branch '2.7.x' 2022-02-17 09:17:35 +01:00
Moritz Halbritter 7d68b58c8f Load auto-configurations from META-INF/spring-boot
Implements a new AutoConfigurationLoader, which loads
auto-configurations from a file in META-INF/spring-boot.

Adapts the AutoConfigurationImportSelector to use the new loader.

Adapts the ImportAutoConfigurationImportSelector to use the new loader.

Adapts the metadata plugin in the build to additionally load the
auto-configurations from the new file.

Updates the documentation for auto-configurations and test slices.

Closes gh-29872
2022-02-17 09:17:23 +01:00
Phillip Webb ff4b92a3ba Update copyright year of changed files 2022-02-16 20:44:54 -08:00
Moritz Halbritter fdb1010cbc Migrate auto-configurations to @AutoConfiguration
Closes gh-29871
2022-02-16 15:48:27 +01:00
Moritz Halbritter 8e99788fc8 Migrate auto-configurations to @AutoConfiguration
Closes gh-29871
2022-02-16 13:55:16 +01:00
Stephane Nicoll b22e3d51dc Merge branch '2.7.x' 2022-02-04 10:10:29 +01:00
Henning Poettker e3d0f1feee Adjust IDENTITY in DDLs for H2 2.x compatibility
See gh-29200
2022-02-04 09:57:59 +01:00
Phillip Webb a282f912e6 Organize imports
Organize imports according to updated checkstyle rules.
2022-02-02 19:16:13 -08:00
Phillip Webb 501d174db0 Merge branch '2.7.x' 2022-02-02 10:38:46 -08:00
Phillip Webb ce08b519b1 Merge branch '2.6.x' into 2.7.x 2022-02-02 10:37:55 -08:00
Phillip Webb 50e0e28155 Merge branch '2.5.x' into 2.6.x 2022-02-02 10:37:32 -08:00
Stephane Nicoll 41fb9cf562 Merge branch '2.7.x' 2022-02-01 11:15:49 +01:00
Stephane Nicoll f812b33cbd Merge branch '2.6.x' into 2.7.x
Closes gh-29613
2022-02-01 11:07:31 +01:00
Stephane Nicoll 136b5959c3 Merge branch '2.5.x' into 2.6.x
Closes gh-29612
2022-02-01 10:59:08 +01:00
Stephane Nicoll 7f17f819a6 Polish "Enforce use of BDDMockito"
See gh-29178
2022-02-01 10:03:18 +01:00
Yanming Zhou b49418aaaf Enforce use of BDDMockito
1. Replace Mockito.verify*() with BDDMockito.then()
2. Replace Mockito.doReturn() with BDDMockito.willReturn()
3. Adjust checkstyle rule

See gh-29178
2022-02-01 09:37:15 +01:00
Stephane Nicoll 68bd6f91cf Merge branch '2.7.x' 2022-01-29 15:34:16 +01:00
Stephane Nicoll a94b176c39 Merge branch '2.6.x' into 2.7.x
Closes gh-29595
2022-01-29 15:34:08 +01:00
izeye 118eb5f74a Polish AbstractHealthEndpointAdditionalPathIntegrationTests
See gh-29593
2022-01-29 15:33:25 +01:00
Madhura Bhave 8125b46ed5 Merge branch '2.7.x' into main 2022-01-27 12:09:51 -08:00
Madhura Bhave 81bbd295e9 Merge branch '2.6.x' into 2.7.x
Closes gh-29584
2022-01-27 12:04:26 -08:00
Madhura Bhave 0597c6831e Configure health on additional path only when health exposed
Prior to this commit, limiting the exposure to a specific
technology in `ConditionalOnAvailableEndpoint` would not have
any effect because all endpoints would be considered to be available
if the app was running on Cloud Foundry. This caused issues in cases
where beans were meant to be exposed only if the endpoint was actually
exposed.

This commit adds CLOUD_FOUNDRY to the `EndpointExposure`
enum. This allows `ConditionalOnAvailableEndpoint` to limit
by exposure even when the Cloud Foundry platform is active.

Fixes gh-29532
2022-01-27 11:44:54 -08:00
Andy Wilkinson de3b9a4910 Remove code deprecated for removal in 2.x
Closes gh-29482
2022-01-19 17:25:14 +00:00
Stephane Nicoll 4d03f89a55 Harmonize dependency upgrades with Spring Boot 2.7.0-M1
Closes gh-29476
2022-01-19 10:39:18 +01:00
Stephane Nicoll 90b8d2190f Adapt to latest change in Spring Data Elasticsearch 2022-01-12 10:04:44 +01:00
Stephane Nicoll 8ec8268a77 Merge branch '2.7.x' 2022-01-10 12:07:19 +01:00
Stephane Nicoll c02faea9c9 Allow WebMvcFilter to be overridden by user configuration
Closes gh-28428
2022-01-10 12:02:08 +01:00
Stephane Nicoll 5f67546534 Adapt to latest API change in SD Elasticsearch
See gh-29292
2022-01-09 22:24:05 +01:00
Stephane Nicoll 9e27bddfc7 Start building against Spring Data 2021.2.0-M1 snapshots
This commit also upgrades to Elasticsearch 7.16.2

See gh-29223
See gh-29292
2022-01-08 19:57:50 +01:00
Andy Wilkinson 894f83fb13 Upgrade to Artemis 2.20.0 and switch to Jakarta EE 9 JMS API
Closes gh-29203
2022-01-07 15:26:39 +00:00
Andy Wilkinson 89e79e826e Reinstate support for Apache Artemis
See gh-29203
2022-01-07 15:26:29 +00:00
Andy Wilkinson 9a05eb63c4 Use built-in basic auth support as it no longer requires JAX-B
Closes gh-28829
2022-01-06 18:12:14 +00:00
Stephane Nicoll 025fe4fd43 Merge branch '2.7.x' 2022-01-06 17:50:15 +01:00
Stephane Nicoll a780e87e9c Upgrade to Hazelcast 5.0.2
See gh-29265
2022-01-06 17:38:06 +01:00
Phillip Webb 760dcffd8b Merge branch '2.7.x' 2022-01-04 12:22:54 -08:00
Phillip Webb f09bde2b60 Merge branch '2.6.x' into 2.7.x 2022-01-04 12:20:31 -08:00
Phillip Webb dc054943bf Merge branch '2.7.x'
Closes gh-29262
2022-01-04 12:14:18 -08:00
Phillip Webb c839ebbce4 Merge branch '2.6.x' into 2.7.x
Closes gh-29261
2022-01-04 12:13:55 -08:00
Phillip Webb 8e583f6f73 Apply exclusion rules to child contributors
Update `IncludeExcludeGroupMemberPredicate` so that exclusion rules are
also applied to child contributors. The restores the behavior of Spring
Boot 2.5.x where `management.endpoint.health.group.mygroup.exclude=db`
would exclude 'db/one', 'db/two' etc.

Fixes gh-29251
2022-01-04 12:12:03 -08:00
Andy Wilkinson 1dbfcf8b57 Reinstate support for Spring Data Couchbase
Closes gh-28976
2022-01-04 16:38:16 +00:00
Stephane Nicoll abb622023d Merge branch '2.7.x' 2022-01-04 14:23:48 +01:00
Stephane Nicoll d24720d958 Polish "Expose OS information as an InfoContributor"
See gh-28907
2022-01-04 14:08:24 +01:00
Jonatan Ivanov c700f686c6 Expose OS information as an InfoContributor
See gh-28907
2022-01-04 13:58:39 +01:00
Stephane Nicoll b94fcd1ad7 Merge branch '2.7.x' 2021-12-30 07:33:36 +01:00
Stephane Nicoll de947e0800 Merge branch '2.6.x' into 2.7.x
Closes gh-29190
2021-12-30 07:33:26 +01:00
izeye d234681348 Fix default value for management.info.env.enabled in metadata
See gh-29187
2021-12-30 07:32:58 +01:00
Stephane Nicoll 09486b8fc7 Merge branch '2.7.x' 2021-12-27 12:03:11 +01:00
Stephane Nicoll 2b140950e3 Merge branch '2.6.x' into 2.7.x
Closes gh-29176
2021-12-27 12:02:57 +01:00
izeye 7fbb5749d1 Polish
See gh-29157
2021-12-27 12:01:50 +01:00
Brian Clozel f61c87c3a7 Revert "Merge branch '2.7.x'"
This reverts commit f0677a119c, reversing
changes made to 938d58f32c.
2021-12-21 09:05:06 +01:00
Brian Clozel f0677a119c Merge branch '2.7.x' 2021-12-21 09:04:10 +01:00
Brian Clozel 8e29eac887 Auto-configure GraphQL metrics
This commit auto-configures the metrics infrastructure for Spring
GraphQL.

See gh-29140
2021-12-21 08:34:32 +01:00
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
2021-12-21 08:34:24 +01:00
Phillip Webb 003fb229fd Merge branch '2.7.x' 2021-12-16 13:07:22 -08:00
Phillip Webb f3bcbca841 Update copyright year of changed files 2021-12-16 13:05:17 -08:00
Andy Wilkinson 3c8d4d33e1 Upgrade to Spring Data Elasticsearch 7.16.0
Closes gh-28987
2021-12-10 21:43:29 +00:00
Stephane Nicoll c83ab9bbc5 Merge branch '2.7.x' 2021-12-09 15:51:29 +01:00
Stefano Cordio a5c56043b9 Simplify AssertJ usage
See gh-28862
2021-12-09 15:39:02 +01:00
Stephane Nicoll fcea05a4b8 Merge branch '2.7.x' 2021-12-09 15:09:53 +01:00
izeye 0364353204 Add public accessor for StackdriverProperties.useSemanticMetricTypes
See gh-28944
2021-12-09 15:09:13 +01:00
Scott Frederick 33953823fc Replace usage of deprecated Spring Framework methods
See gh-28642
2021-12-06 16:12:34 -06:00
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
2021-11-30 20:32:16 +00:00
Andy Wilkinson 85f9949513 Remove support for Jolokia
Closes gh-28704
2021-11-30 15:55:47 +00:00
Andy Wilkinson 79b53e3562 Drop support for auto-configuring Hibernate metrics
Closes gh-28703
2021-11-30 15:55:20 +00:00
Madhura Bhave c8fd5f0080 Remove support for Artemis
Closes gh-28593
2021-11-30 15:39:56 +00:00
Andy Wilkinson 8bf2ffd93c Drop support for Jersey until jersey-spring6 is available
Closes gh-28808
2021-11-30 15:39:39 +00:00
Scott Frederick 29a21d4621 Remove support for Spring Data Couchbase and Couchbase caching
Fixes gh-28613
2021-11-30 15:39:28 +00:00
Andy Wilkinson 63492507b4 Remove support for Apache ActiveMQ
Closes gh-28591
2021-11-30 15:38:46 +00:00
Andy Wilkinson 64bf33038d Remove support for EhCache 2
Closes gh-28588
2021-11-30 15:38:23 +00:00
Andy Wilkinson 814c86c5e8 Raise the minimum supported version of Gradle to 7.3
Closes gh-28100
2021-11-30 15:36:54 +00:00
izeye c7921468fc Polish
See gh-28836
2021-11-29 09:38:07 +01:00
Phillip Webb beb68671bb Update copyright year of changed files 2021-11-24 10:23:32 -08:00
Yanming Zhou da2dfbe0aa LettuceMetricsAutoConfiguration should not build ClientResources
See gh-28767
2021-11-22 09:49:07 +01:00
Andy Wilkinson 0074d621d0 Merge branch '2.5.x'
Closes gh-28754
2021-11-19 15:37:32 +00:00
Andy Wilkinson 015cf920da Name custom task inputs
Closes gh-28753
2021-11-19 15:35:39 +00:00
Andy Wilkinson 258222781a Merge branch '2.5.x'
Closes gh-28752
2021-11-19 14:52:03 +00:00
Andy Wilkinson 96d98a0f6f Declare dir task inputs with relative path sensitivity
Closes gh-28751
2021-11-19 14:29:29 +00:00
Stephane Nicoll d88658d47a Remove dependencies on micrometer-jersey2
Closes gh-28706
2021-11-17 08:56:08 +01:00
Stephane Nicoll 52ecc1e0dd Polish "Create EndpointWebExtension only if necessary"
See gh-28475
2021-11-16 08:22:35 +01:00
davidh44 b658013a97 Create EndpointWebExtension only if necessary
This commit updates Actuator's EndpointWebExtensions to be created only
if the related endpoint is exposed over HTTP.

See gh-28475
2021-11-16 08:15:19 +01:00
Scott Frederick 8903c69b19 Avoid exposing time-related task metrics
Fixes gh-28535
2021-11-15 12:24:50 -06:00
Scott Frederick d7f8931dd4 Make TaskExecution and TaskScheduling metrics unique
Fixes gh-28536
2021-11-15 12:23:25 -06:00
Andy Wilkinson 2a342ef416 Merge branch '2.5.x'
Closes gh-28662
2021-11-12 23:40:35 +00:00
Andy Wilkinson 5e4a502b2d Merge branch '2.4.x' into 2.5.x
Closes gh-28661
2021-11-12 20:31:25 +00:00
Andy Wilkinson 2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
2021-11-12 20:04:35 +00:00
Andy Wilkinson 5f1103f381 Add missing @Deprecated annotation
Closes gh-28602
2021-11-11 12:03:33 +00:00
Phillip Webb c7e61e448e Polish "Remove 'etc' in reference documentation"
See gh-28497
2021-11-08 13:27:24 -08:00
izeye 3e1bc01839 Fix whenThereIsNoMeterRegistryThenClientResourcesCustomizationBacksOff()
See gh-28492
2021-11-01 09:00:19 +01:00
Andy Wilkinson 875479abeb Merge branch '2.5.x'
Closes gh-28490
2021-10-29 15:52:18 +01:00
Andy Wilkinson 33249e9414 Merge branch '2.4.x' into 2.5.x
Closes gh-28489
2021-10-29 15:52:08 +01:00
Andy Wilkinson 12d8f942be Stop logging to the file used in the generated documentation
Closes gh-28488
2021-10-29 15:51:32 +01:00
Stephane Nicoll 837e2ac277 Fix bean type visibility
Closes gh-28437
2021-10-23 07:31:27 +02:00
Stephane Nicoll 475e9c9969 Polish "Fix classpath condition for Lettuce metrics auto-configuration"
See gh-28436
2021-10-22 14:49:33 +02:00
sokomishalov 1f86fe3d48 Fix classpath condition for Lettuce metrics auto-configuration
See gh-28436
2021-10-22 14:47:56 +02:00
Andy Wilkinson 47da70632f Merge branch '2.5.x'
Closes gh-28430
Closes gh-28431
2021-10-22 10:12:53 +01:00
Andy Wilkinson 585b8880c7 Merge branch '2.4.x' into 2.5.x
Closes gh-28424
2021-10-22 10:10:50 +01:00
Andy Wilkinson 7f976dab9e Polish "Don't use markdown syntax in javadoc or error messages"
See 2f6651c3cb.

Closes gh-28408
2021-10-22 10:08:27 +01:00
Phillip Webb e25f216eab Merge branch '2.5.x'
Closes gh-28425
2021-10-21 11:28:33 -07:00
Phillip Webb daf36dff55 Merge branch '2.4.x' into 2.5.x
Closes gh-28424
2021-10-21 11:27:29 -07:00
Phillip Webb 2f6651c3cb Don't use markdown syntax in javadoc or error messages
Closes gh-28408
2021-10-21 11:24:54 -07:00
Andy Wilkinson 284725f5be Polish "Expose Stackdriver's useSemanticMetricTypes property"
See gh-28403
2021-10-21 17:57:23 +01:00
Jonatan Ivanov 9397121a98 Expose Stackdriver's useSemanticMetricTypes property
See gh-28403
2021-10-21 17:57:07 +01:00
Andy Wilkinson 8bf3780c15 Polish "Expose Elastic's apiKeyCredentials property"
See gh-28400
2021-10-21 17:35:32 +01:00
Jonatan Ivanov dd475a2445 Expose Elastic's apiKeyCredentials property
See gh-28400
2021-10-21 17:17:01 +01:00
Andy Wilkinson 56b8494f15 Disable the env info contributor by default
Closes gh-28311
2021-10-20 12:42:17 +01:00
Andy Wilkinson f98c1e7231 Disable the java info contributor by default
Closes gh-28310

Co-authored-by Phillip Webb <pwebb@vmware.com>
2021-10-20 12:18:54 +01:00
Madhura Bhave 40a3824279 Reinstate ConditionalOnBean
See gh-28131
2021-10-19 21:23:48 -07:00
Madhura Bhave b7521e2fda Auto-configure health web components only if endpoint is exposed over HTTP
Fixes gh-28131

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-10-19 20:26:44 -07:00
Andy Wilkinson 42ef97b9ec Merge branch '2.5.x'
Closes gh-28372
2021-10-18 15:07:16 +01:00
Andy Wilkinson 5f4c001316 Merge branch '2.4.x' into 2.5.x
Closes gh-28371
2021-10-18 15:06:58 +01:00
Andy Wilkinson a93cf64834 Make JMX endpoints available when lazy init is enabled
Closes gh-28335
2021-10-18 13:37:45 +01:00
Phillip Webb 8c748cd01f Merge branch '2.5.x'
Closes gh-28352
2021-10-14 12:16:48 -07:00
Phillip Webb aeadb0ceb6 Merge branch '2.4.x' into 2.5.x
Closes gh-28351
2021-10-14 12:16:38 -07:00
Andy Wilkinson 540468b2f0 Fix parsing of day duration meter values
Switch `MeterValue` parsing logic so that we try `Duration` before
`double`. Prior to this commit, the value `1d` would result in `1.0`
rather than "1 day".

Fixes gh-28302
2021-10-14 12:13:39 -07:00
Andy Wilkinson 1a505964ee Merge branch '2.5.x'
Closes gh-28207
2021-10-06 10:03:24 +01:00
Andy Wilkinson 1931104d13 Merge branch '2.4.x' into 2.5.x
Closes gh-28206
2021-10-06 09:57:19 +01:00
Andy Wilkinson 9c9fbf400e Upgrade to Spring Java Format 0.0.29
Closes gh-28205
2021-10-06 09:52:45 +01:00
Stephane Nicoll 5d17257a52 Polish "Add Java InfoContributor"
See gh-28136
2021-10-05 15:11:58 +02:00
Jonatan Ivanov fc87da7ef3 Add Java InfoContributor
See gh-28136
2021-10-05 13:52:42 +02:00
Phillip Webb 98a0e07dd5 Polish "Add startup time metrics"
See gh-27878
2021-09-21 14:45:00 -07:00
Phillip Webb 55a1ec72cc Update copyright year of changed files 2021-09-21 11:25:50 -07:00
Phillip Webb 5ba69634c9 Merge branch '2.4.x' into 2.5.x 2021-09-21 11:17:55 -07:00
Phillip Webb dfd36673f7 Update copyright year of changed files 2021-09-21 11:17:19 -07:00
Stephane Nicoll c62a6819fe Polish "Add startup time metrics"
See gh-27878
2021-09-16 13:33:08 +02:00
bono007 2e67963bfe Add startup time metrics
See gh-27878
2021-09-16 13:19:20 +02:00
Stephane Nicoll b626adf1ee Polish "Add support for configuring the path of disk space metrics"
See gh-27660
2021-09-16 07:41:35 +02:00
bono007 08251b26d0 Add support for configuring the path of disk space metrics
See gh-27660
2021-09-16 07:13:21 +02:00
Stephane Nicoll 225599a52b Adapt to changes in Micrometer milestone 2021-09-16 06:54:36 +02:00
Stephane Nicoll e1b1a25021 Polish "Auto-configure Micrometer's Lettuce latency metrics"
See gh-27865
2021-09-14 09:33:48 +02:00
Antonin ARQUEY 190fea6faa Auto-configure Micrometer's Lettuce latency metrics
Add auto-configuration support to export Lettuce latency metrics.

See gh-27865
2021-09-14 09:19:42 +02:00
Stephane Nicoll 726a2591fb Start building against Micrometer 1.8.0-M3 snapshots
See gh-27931
2021-09-11 08:35:48 +02:00
Madhura Bhave 393081f2e6 Enable PathPattern based matching for MVC actuators
Closes gh-24645
2021-09-08 16:23:16 -07:00
Stephane Nicoll 39a1c854d8 Polish "Auto-configure JVM heap pressure metrics"
See gh-27868
2021-09-05 17:36:27 +02:00
Vladimir Konkov ba21c90355 Auto-configure JVM heap pressure metrics
See gh-27868
2021-09-05 17:31:15 +02:00
izeye 6e3874d48e Polish test method names in PropertiesMeterFilterTests
See gh-27832
2021-09-05 17:13:46 +02:00
Madhura Bhave 253f98c3e7 Add pluggable abstraction for applying custom sanitization rules
Closes gh-27840
2021-08-30 21:31:15 -07:00
Andy Wilkinson c5272a4122 Merge branch '2.5.x'
Closes gh-27800
2021-08-23 14:28:53 +01:00
Andy Wilkinson 24c88ab80b Polish "Avoid NPE when routing DataSource has target with null key"
See gh-27698
2021-08-23 13:53:34 +01:00
Safeer A efdc19647c Avoid NPE when routing DataSource has target with null key
See gh-27698
2021-08-23 13:40:33 +01:00
Madhura Bhave 8fd9eb72d4 Allow part of a composite contributor in a health group
Closes gh-23027

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-08-18 15:44:10 -07:00
Stephane Nicoll b65cc4d62f Relocate DiskSpace metrics to SystemMetricsAutoConfiguration
Closes gh-27688
2021-08-16 14:54:05 +02:00
Stephane Nicoll 1475309b4d Polish "Add expiry and bufferLength configuration properties"
See gh-27584
2021-08-16 10:05:47 +02:00
Leo Li 888acb94fc Add expiry and bufferLength configuration properties
See gh-27584
2021-08-16 09:32:38 +02:00
Andy Wilkinson 52db64daa4 Merge branch '2.5.x'
Closes gh-27637
2021-08-12 12:32:14 +01:00
Andy Wilkinson 341e129a59 Use SingletonSupplier in MetricsRepositoryFactoryCustomizer
Closes gh-27634
2021-08-12 11:35:11 +01:00
Andy Wilkinson fbeb5f19b7 Merge branch '2.5.x'
Closes gh-27636
2021-08-12 10:36:18 +01:00
Andy Wilkinson 35ea3b234d Prevent repository metrics from causing a circular reference
Fixes gh-27591
2021-08-12 10:26:16 +01:00
Madhura Bhave 49c86e6e1b Allow health groups to be configured at an additional path
Closes gh-25471

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-08-11 19:25:25 -07:00
Andy Wilkinson 64c0eceec7 Add support for dumping the heap on OpenJ9
Closes gh-26466
2021-07-30 15:35:59 +01:00
Andy Wilkinson e265825653 Merge branch '2.5.x'
Closes gh-27506
2021-07-27 11:03:00 +01:00
Andy Wilkinson 08e26c97aa Merge branch '2.4.x' into 2.5.x
Closes gh-27505
2021-07-27 11:02:20 +01:00
Andy Wilkinson 031a036c9f Customize security filter registration in separate management context
Fixes gh-27372
2021-07-27 10:57:38 +01:00
Andy Wilkinson 355226c21e Merge branch '2.5.x'
Closes gh-27474
2021-07-23 13:09:37 +01:00
Andy Wilkinson eaca9c7a83 Merge branch '2.4.x' into 2.5.x
Closes gh-27473
2021-07-23 13:09:27 +01:00
Andy Wilkinson ee07d6c3ca Increase response timeout for server-bound WebTestClients
Closes gh-27472
2021-07-23 13:06:25 +01:00
Phillip Webb 7e9ac39f0d Update copyright year of changed files 2021-07-22 09:50:37 -07:00
Andy Wilkinson 37f690323f Polish
Closes gh-27432
2021-07-21 11:55:38 +01:00
izeye 14d8c33125 Polish
See gh-27405
2021-07-19 14:45:47 +01:00
Andy Wilkinson 84455f86fd Polish "Add properties for Dynatrace metrics API v2 ingest with Micrometer" 2021-07-15 13:07:37 +01:00
Georg Pirklbauer 3161164912 Add properties for Dynatrace metrics API v2 ingest with Micrometer 2021-07-15 11:57:58 +01:00
Stephane Nicoll 36beca2c7d Add ERROR-level metadata for removed properties
See gh-27303
2021-07-14 14:58:52 +02:00
Stephane Nicoll dc5acb0019 Remove deprecated code flagged for removal
Closes gh-27303
2021-07-14 11:50:01 +02:00
Andy Wilkinson 75fdd89be4 Polish "Add resource labels to Stackdriver metrics configuration properties"
See gh-26961
2021-07-13 15:02:42 +01:00
Mikolaj Stefaniak 4e3958e5aa Add resource labels to Stackdriver metrics configuration properties
Using resource labels is mandatory for most Stackdriver resources other
than 'Global', i.e. k8s_pod. Configuring valid resource type along with
related labels makes it possible to use given metric in a wider set of
GCP solutions, i.e. custom metric based GKE pod horizontal autoscaler.

See gh-26961
2021-07-13 15:02:22 +01:00
Andy Wilkinson d21f8df1ad Polish "Auto-configure Jetty connection and SSL metrics"
See gh-26418
2021-07-13 14:01:15 +01:00
bono007 e6c43a32c8 Auto-configure Jetty connection and SSL metrics
See gh-26418
2021-07-13 14:01:15 +01:00
Andy Wilkinson 5c9f2668a5 Merge branch '2.5.x'
See gh-27168
2021-07-13 13:13:58 +01:00
Andy Wilkinson 6ed7e692a9 Merge branch '2.4.x' into 2.5.x
See gh-27163
2021-07-13 13:13:36 +01:00
Andy Wilkinson 1341ca99db Align with Framework's deprecation of getLastModified
See gh-27160
2021-07-13 13:12:45 +01:00
Stephane Nicoll 5bb6188f6d Merge branch '2.5.x'
Closes gh-27218
2021-07-09 10:44:40 +02:00
Stephane Nicoll 25fe6a107a Fix visibility of a type exposed as a bean
Closes gh-27189
2021-07-09 10:40:00 +02:00
Stephane Nicoll 786d7cdb6e Merge branch '2.5.x'
Closes gh-27118
2021-06-29 09:09:14 +02:00
dreis2211 c852961011 Avoid reflection in tests
See gh-27085
2021-06-29 08:25:45 +02:00
Andy Wilkinson 0ec598c99d Merge branch '2.5.x' 2021-06-14 13:36:37 +01:00
Andy Wilkinson 9e2339b5d0 Merge branch '2.4.x' into 2.5.x 2021-06-14 13:36:29 +01:00
Andy Wilkinson bc715c64b1 Merge branch '2.5.x'
Closes gh-26892
2021-06-14 13:33:19 +01:00
Andy Wilkinson 5f26fd9ccb Merge branch '2.4.x' into 2.5.x
Closes gh-26891
2021-06-14 13:28:54 +01:00
Andy Wilkinson f6b7730dac Use Asciidoctor's revision line to provide document's version
Using the revision line means that the revision number is automatically
set. The revision number is then included by the HTML and PDF backends
in the standard location. In the HTML backend that's alongside the
list of authors. In the PDF backend that's on the title page.

Closes gh-26851
2021-06-14 13:24:01 +01:00
Stephane Nicoll f8555b9071 Add metrics for task execution and scheduling
Closes gh-23818
2021-06-14 09:07:40 +02:00
Stephane Nicoll a90c7181b7 Polish "Add auto-configuration for DiskSpaceMetrics"
See gh-26001
2021-06-11 17:01:36 +02:00
bono007 e3f03dd50a Add auto-configuration for DiskSpaceMetrics
See gh-26001
2021-06-11 17:01:36 +02:00
Andy Wilkinson de410b7621 Merge branch '2.4.x'
Closes gh-26828
2021-06-09 18:01:32 +01:00
Andy Wilkinson a1c5fcca58 Move common Asciidoctor configuration into our conventions
Closes gh-26620
2021-06-09 18:00:45 +01:00
Phillip Webb 4d62e47c5d Merge branch '2.3.x' into 2.4.x 2021-06-08 18:05:12 -07:00
Phillip Webb 9e1c78da99 Update copyright year of changed files 2021-06-08 18:03:46 -07:00
Stephane Nicoll b8b0430139 Merge branch '2.4.x'
Closes gh-26697
2021-05-28 13:29:42 +02:00
Stephane Nicoll 7f5adb7e9d Merge branch '2.3.x' into 2.4.x
Closes gh-26696
2021-05-28 13:29:29 +02:00
Stephane Nicoll 67fe60ba8a Add missing static on JerseyInfrastructureConfiguration
Closes gh-26695
2021-05-28 13:26:37 +02:00
Andy Wilkinson 7a7050879c Avoid eager initialization when configuring Data repository metrics
Fixes gh-26630
2021-05-21 13:54:35 +01:00
Phillip Webb ab958d2394 Include io.spring.asciidoctor.backends group
Update `repositories` declaration to include the
'io.spring.asciidoctor.backends' group.

See gh-26293
2021-05-19 22:58:31 -07:00
Phillip Webb f692b0e937 Rework title anchors for actuator docs
Closes gh-26615
2021-05-19 21:19:24 -07:00
Phillip Webb 2dbf39c738 Polish asciidoc formatting 2021-05-19 21:19:24 -07:00
Madhura Bhave a28072bab4 Merge branch '2.4.x' into main
Closes gh-26614
2021-05-19 16:17:34 -07:00
Madhura Bhave 27fee5fa95 Configure filter to process preflight requests for webflux actuator endpoints
Fixes gh-24541
2021-05-19 16:16:16 -07:00
Madhura Bhave 99ed291184 Merge branch '2.4.x' into main 2021-05-19 15:27:48 -07:00
Madhura Bhave 29d1e22b91 Fix rawtypes 2021-05-19 15:26:53 -07:00
Madhura Bhave 3ef9b7e634 Merge branch '2.4.x' into main
Closes gh-26612
2021-05-19 15:01:45 -07:00
Madhura Bhave 743ac4c394 Merge branch '2.3.x' into 2.4.x
Closes gh-26611
2021-05-19 14:55:53 -07:00
Madhura Bhave b26e842050 Configure CORS in default security configuration for MVC
Fixes gh-11987
2021-05-19 14:40:57 -07:00
Phillip Webb 8a3f835ffe Set Asciidoctor attribute-missing to warn
Closes gh-26590
2021-05-19 11:53:46 -07:00
Phillip Webb 0c8d819150 Merge branch '2.4.x'
Closes gh-26584
2021-05-17 17:10:10 -07:00
Phillip Webb 0699fdcc8a Polish 'Allow remote devtools access with Spring Security'
See gh-25868
2021-05-17 16:54:27 -07:00
Hatef Palizgar 9b2e13aace Allow remote devtools access with Spring Security
Update `ManagementWebSecurityAutoConfiguration` so that the
`managementSecurityFilterChain` bean has an explicit order.

Prior to this commit, the `managementSecurityFilterChain` would override
the `securityFilterChain` in `RemoteDevtoolsSecurityConfiguration` which
would prevent the remote devtools endpoint from being accessed.

See gh-25868
2021-05-17 16:51:18 -07:00
Stephane Nicoll d3c817b7ba Polish "Remove unnecessary throws declaration in tests"
See gh-26441
2021-05-17 09:36:53 +02:00
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
2021-05-17 09:31:51 +02:00
Phillip Webb 83668f96af Merge branch '2.4.x'
Closes gh-26458
2021-05-13 23:38:41 -07:00
Phillip Webb 73131e99da Make BufferingApplicationStartup thread safe
Update `BufferingApplicationStartup` to use thread safe data structures.

Prior to this commit, it was possible for calls from different threads
(for example due to request scope beans) to cause a
NoSuchElementException to be thrown.

Closes gh-25792
2021-05-13 23:35:36 -07:00
Phillip Webb 87d8aedd3c Use spring-pdf backend for PDF generation
Update `asciidoctorPdf` tasks to use the `spring-pdf` backend so that
chomped elements and @fold:on/@fold:off comments are hidden.

Closes gh-26373
2021-05-10 18:04:05 -07:00
izeye 996472b42d Polish
See gh-26145
2021-04-19 09:34:55 +02:00
Phillip Webb beaf03a008 Update copyright year of changed files 2021-04-15 12:22:48 -07:00
izeye e27c85698d Polish
See gh-26135
2021-04-15 16:31:10 +02:00
izeye fb5a1270e8 Add RepositoryMetricsAutoConfiguration to spring.factories
See gh-26134
2021-04-15 16:27:49 +02:00
Andy Wilkinson 0a8da4fd7d Polish "Provide health for an AbstractRoutingDataSource's resolved targets"
See gh-25708
2021-04-10 11:12:10 +01:00
bono007 13600c3367 Provide health for an AbstractRoutingDataSource's resolved targets
See gh-25708
2021-04-10 11:12:01 +01:00
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
2021-04-09 23:49:25 -07:00
izeye 98b0b6c4c5 Fix MongoMetricsAutoConfigurationTests
See gh-25952
2021-04-09 14:20:41 +02:00
Stephane Nicoll d50e581403 Start building against Micrometer 1.7.0-RC1 snapshots
See gh-25934
2021-04-09 13:44:32 +02:00
Brian Clozel b4d2207902 Merge branch '2.4.x'
Closes gh-25936
2021-04-08 17:45:42 +02:00
Brian Clozel a0ee0601ef Fix SSL configuration with Reactor Netty
Prior to this commit, the SslServerCustomizer would use a Reactor Netty
API that lets users customize the SSL configuration, but later override
some of the choices with defaults.

This commits moves from the new deprecated Reactor Netty API and instead
uses a new variant that builds the defaults and lets developers override
them if they want to.

Fixes gh-25913
2021-04-08 17:09:31 +02:00
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
2021-04-07 16:54:37 -07:00
Phillip Webb 807ea1af0d Update copyright year of changed files 2021-04-06 14:59:52 -07:00
Andy Wilkinson 73e1dd8728 Polish "Auto-configure Mongo metrics"
See gh-23990
2021-04-06 18:15:09 +01:00
bono007 81c18214d1 Auto-configure Mongo metrics
See gh-23990
2021-04-06 16:58:39 +01:00
Andy Wilkinson ef986b13e5 Polish Quartz endpoint documentation
See gh-10364
2021-04-06 16:56:17 +01:00
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
2021-04-06 12:13:28 +02:00
Vedran Pavic 9795061360 Add Quartz actuator endpoint
See gh-10364
2021-04-06 11:36:54 +02:00
Andy Wilkinson 029f1b52b3 Merge branch '2.4.x'
Closes gh-25867
2021-04-01 16:51:42 +01:00
Andy Wilkinson ba28f21e27 Merge branch '2.3.x' into 2.4.x
Closes gh-25866
2021-04-01 16:51:31 +01:00
Andy Wilkinson cbf37b3a8b Use main as the branch name in info endpoint example
Closes gh-25865
2021-04-01 16:46:37 +01:00
Phillip Webb 8c31d29acf Merge branch '2.4.x' 2021-03-30 09:29:59 -07:00
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 2021-03-30 09:25:46 -07:00
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
2021-03-30 09:20:30 -07:00
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
2021-03-29 15:48:20 -07:00
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
2021-03-29 15:46:50 -07:00
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
2021-03-29 15:44:58 -07:00
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
2021-03-24 14:57:29 +00:00
Phillip Webb 11a94ee6f0 Merge branch '2.3.x' into 2.4.x 2021-03-23 12:52:07 -07:00
Phillip Webb 82127fdaa3 Update copyright year of changed files 2021-03-23 12:50:49 -07:00
Andy Wilkinson ce3dfc5792 Merge branch '2.4.x'
Closes gh-25767
2021-03-23 13:42:15 +00:00
Andy Wilkinson 33cf8b3bc4 Merge branch '2.3.x' into 2.4.x
Closes gh-25765
2021-03-23 13:06:35 +00:00
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
2021-03-23 13:05:54 +00:00
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
2021-03-18 20:50:40 -07:00
Phillip Webb 663fd8ce5e Update copyright year of changed files 2021-03-18 14:49:52 -07:00
Stephane Nicoll 1111b3db98 Polish 2021-03-18 09:10:42 +01:00
Stephane Nicoll 8808d5e4c0 Polish "Support sending metrics to InfluxDB v2"
See gh-25721
2021-03-17 15:56:04 +01:00
Tommy Ludwig 8eb73bcf01 Support sending metrics to InfluxDB v2
See gh-25721
2021-03-17 15:14:43 +01:00
Stephane Nicoll 6f9352bda9 Fix description of management.metrics.export.influx.db
Closes gh-25723
2021-03-17 15:09:37 +01:00
Stephane Nicoll 91c3c7276b Merge branch '2.4.x'
Closes gh-25725
2021-03-17 15:08:47 +01:00
Stephane Nicoll 42994349fe Merge branch '2.3.x' into 2.4.x
Closes gh-25724
2021-03-17 15:08:32 +01:00
Stephane Nicoll 446e838b1b Fix description of management.metrics.export.influx.db
Closes gh-25723
2021-03-17 15:07:02 +01:00
Stephane Nicoll eb406867ea Polish "Upgrade to Micrometer 1.7.0-M1"
See gh-25707
2021-03-17 11:28:52 +01:00
Jonatan Ivanov 7c5e0505d8 Upgrade to Micrometer 1.7.0-M1
See gh-25707
2021-03-17 11:12:25 +01:00
Stephane Nicoll e517ee8635 Merge branch '2.4.x'
Closes gh-25618
2021-03-13 18:22:57 +01:00
izeye 09f4d4b9bf Polish
See gh-25617
2021-03-13 18:08:54 +01:00
Phillip Webb 6e5c510e0a Migrate to asciidoctor-spring-backends
Migrate to the snapshot version of asciidoctor-spring-backends.

See gh-25553
2021-03-08 22:07:17 -08:00
Stephane Nicoll adaf2fc57c Merge branch '2.4.x'
Closes gh-25536
2021-03-08 08:48:41 +01:00
dreis2211 2575621e06 Fix some illegal reflective access warnings
See gh-25531
2021-03-08 08:47:10 +01:00
Stephane Nicoll bb0f43cf07 Allow JMX endpoint ObjectNames to be customized
Closes gh-25317
2021-03-05 16:19:19 +01:00
Stephane Nicoll 36f8a7b9a6 Upgrade copyright year of changed files
See gh-25451
2021-02-27 11:23:07 +01:00
izeye c823f44e76 Polish
See gh-25451
2021-02-27 11:22:05 +01:00
Andy Wilkinson 54ba9e6ddf Merge branch '2.4.x'
Closes gh-25450
2021-02-26 14:30:47 +00:00
Andy Wilkinson cb600f1c0b Merge branch '2.3.x' into 2.4.x
Closes gh-25449
2021-02-26 14:26:57 +00:00
Andy Wilkinson 8f72ca6521 Use ResourceConfig customization to register endpoints with Jersey
Previously, actuator endpoints were registered with Jersey upon
injection of the ResourceConfig bean into a registrar class rather than
using a ResourceConfigCustomizer. This was done to fix a problem
when running the Actuator on a separate port where the main application
context's customizers were also applied to the management context,
breaking the singleton contract for those resources. This approach
meant that the registration could be performed at any point after the
ResourceConfig had been created. When Jersey's configured as a Filter
this resulted in the registration failing as the attempt was being made
after the Filter lifecyle callbacks which make the ResourceConfig
immutable.

This commit reworks the endpoint registration to be performed using a
ManagementContextResourceConfigCustomizer, a resource config customizer
that's only applied to the ResourceConfig that's used by the Actuator.
When there's a separate management context, this ResourceConfig is
created by the Actuator's auto-configuration and the management context
resource config customizers are applied to it during its creation. The
main application's customizers are not applied. When the actuator is
using the same context as the main application, this ResourceConfig is
created by the main application. In this case a
ResourceConfigCustomizer is defined that delegates to all
ManagementContextResourceConfigCustomizers, allowing them to register
the actuator endpoints with the main ResourceConfig.

Fixes gh-25262
2021-02-26 14:25:24 +00:00
Andy Wilkinson f09630f73c Allow additional keys to be configured for value sanitization
Closes gh-25384
2021-02-24 19:28:29 +00:00
Phillip Webb a1dc107144 Update copyright year of changed files 2021-02-18 16:23:56 -08:00
Andy Wilkinson da3f0dc1c7 Merge branch '2.4.x'
Closes gh-25186
2021-02-11 20:12:43 +00:00
Andy Wilkinson 9ba28a8b99 Merge branch '2.3.x' into 2.4.x
Closes gh-25185
2021-02-11 20:12:30 +00:00
Andy Wilkinson bd64e05203 Instrument AMQP AbstractCF when defined as a ConnectionFactory
Fixes gh-25138
2021-02-11 20:09:40 +00:00
Stephane Nicoll b92bb9332b Polish "Filter properties with a particular prefix"
See gh-24718
2021-02-10 17:32:18 +01:00
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
2021-02-10 15:30:02 +01:00
Madhura Bhave 301e80be8c Fix raw types error 2021-02-09 14:15:08 -08:00
Madhura Bhave c05cb21ab7 Add a property to disable the `/actuator` discovery page
Closes gh-24693
2021-02-09 11:36:29 -08:00
Stephane Nicoll b2818680fd Polish "Clarify usage of BufferingApplicationStartup"
See gh-25075
2021-02-09 09:44:19 +01:00
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
2021-02-02 15:14:18 +00:00
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
2021-02-02 15:12:27 +00:00
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 2021-01-26 19:06:48 -08:00
Andy Wilkinson 5a56f8864f Remove error message attribute instead of blanking it when not included
Closes gh-24712
2021-01-22 14:10:02 +00:00
Madhura Bhave d07e351eff Polish " Change info endpoint to be secure and unexposed by default"
See gh-24715
2021-01-21 15:13:53 -08:00
Hatef Palizgar 53c1e79810 Change info endpoint to be secure and unexposed by default
See gh-24715
2021-01-21 13:54:59 -08:00
Phillip Webb a196a9bd8f Merge branch '2.4.x'
Closes gh-24949
2021-01-20 13:49:37 -08:00
Phillip Webb 69fbd2f8aa Delegate `usesPathPatterns()` call to mappings
Update `CompositeHandlerMapping` so that the `usesPathPatterns()` method
returns `true` if any of the delegate mappings return `true`.

Closes gh-24877
2021-01-20 13:49:18 -08:00
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
2021-01-20 15:03:42 +01:00
Stephane Nicoll 3e376b955d Fix build failure
See gh-24943
2021-01-20 14:41:12 +01:00
Andy Wilkinson b095c7761a Polish "Add config prop for endpoints' CORS allowed origin patterns"
See gh-24680
2021-01-19 15:51:14 +00:00
Pedro Ivo Machado d7f891be39 Add config prop for endpoints' CORS allowed origin patterns
See gh-24680
2021-01-19 15:50:31 +00:00
Andy Wilkinson 4e918b141b Polish 2021-01-18 16:30:14 +00:00
Andy Wilkinson c6ce97b8a9 Disable all mappings endpoint infra when endpoint is unavailable
Previously, when the mappings endpoint was not available, the beans
that provide mapping descriptions were still created. This resulted
in unnecessary CPU and memory usage collecting and storing
information that would never by used.

This commit updates the auto-configuration for the mappings endpoint
so that all the beans that it creates are conditional on the endpoint
being available, rather than only the endpoint bean itself.

Closes gh-23977
2021-01-18 15:43:48 +00:00
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
2021-01-15 14:14:33 +01:00
Stephane Nicoll a788ef4958 Merge branch '2.4.x'
Closes gh-24842
2021-01-14 18:03:38 +01:00
Stephane Nicoll 2072e7242a Merge branch '2.3.x' into 2.4.x
Closes gh-24841
2021-01-14 18:02:28 +01:00
Stephane Nicoll 283ed48d63 Unwrap Datasource against an actual interface
This commit updates DataSourceUnwrapper to take a separate interface
type argument if the target datasource has to be unwrapped, given that
the target type is usually not an interface.

Closes gh-24697
2021-01-14 18:00:35 +01:00
Phillip Webb 4cc1467aba Merge branch '2.4.x' 2021-01-12 12:04:40 -08:00
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 2021-01-12 12:04:11 -08:00
Phillip Webb 9da0bd8523 Update copyright year of changed files 2021-01-12 12:02:57 -08:00
Pascal Schumacher aa24f78d85 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
See gh-24734
2021-01-11 13:11:26 +01:00
Stephane Nicoll 632c1239e6 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
2021-01-11 09:12:53 +01:00
bono007 4b8d6efc12 Add support for GET requests for /actuator/startup
See gh-24717
2021-01-11 08:49:06 +01:00
Madhura Bhave b62325a056 Merge branch '2.4.x' 2021-01-04 13:37:05 -08:00
Madhura Bhave 86e94b95c3 Merge branch '2.3.x' into 2.4.x 2021-01-04 13:36:36 -08:00
Madhura Bhave 9928d74a9e Revert fix to enable cors for actuator endpoints
The fix causes a Jersey application to fail in the absence
of a `CorsFilter` or `CorsConfigurationSource` bean.

See gh-11987
2021-01-04 12:25:43 -08:00
Stephane Nicoll e4618cfb8d Delete ErrorProperties.IncludeStacktrace
Closes gh-21286
2020-12-24 10:35:04 +01:00
Stephane Nicoll 2c0bfb7674 Merge branch '2.3.x' into 2.4.x
Closes gh-24578
2020-12-21 09:38:37 +01:00
izeye 97dd4c0871 Polish
See gh-24558
2020-12-21 09:35:41 +01:00
Madhura Bhave 4822516fb7 Merge branch '2.3.x' into 2.4.x 2020-12-16 15:33:58 -08:00
Madhura Bhave 361198ebba Fix tests
See gh-11987
2020-12-16 15:25:02 -08:00
Madhura Bhave a1ea5b49ec Merge branch '2.3.x' into 2.4.x
Closes gh-24542
2020-12-16 14:57:50 -08:00
Madhura Bhave 09e07428cc Configure CORS in default security configuration for MVC
Fixes gh-11987
2020-12-16 14:55:36 -08:00
Phillip Webb 4fba7d0c60 Merge branch '2.3.x' into 2.4.x 2020-12-15 19:48:52 -08:00
Phillip Webb 29300530c6 Polish 2020-12-15 19:44:40 -08:00
Phillip Webb 72d36e0c07 Update copyright year of changed files 2020-12-10 10:46:04 -08:00
Phillip Webb e95c514661 Merge branch '2.3.x'
Closes gh-24412
2020-12-08 17:28:18 -08:00
Phillip Webb 49e754f48b Merge branch '2.2.x' into 2.3.x
Closes gh-24411
2020-12-08 17:23:33 -08:00
Phillip Webb cd5ff6e4af Merge branch '2.3.x'
Closes gh-24404
2020-12-08 12:13:02 -08:00
Phillip Webb 11f285bde5 Merge branch '2.2.x' into 2.3.x
Closes gh-24403
2020-12-08 12:12:51 -08:00
izeye 8c55803931 Polish
See gh-24306
2020-12-08 12:08:35 -08:00
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
2020-12-04 18:31:55 -08:00
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
2020-12-04 18:05:53 -08:00
dreis2211 3e2d0c6d86 Remove deprecated ExposeExcludePropertyEndpointFilter
See gh-24323
2020-12-03 16:18:35 -08:00
Stephane Nicoll bd7e89be1a Start building against Spring Framework 5.3.2 snapshots
See gh-24278
2020-11-30 17:18:35 +01:00
Stephane Nicoll 065fde2996 Start building against Spring Framework 5.2.12 snapshots
See gh-24277
2020-11-30 16:42:38 +01:00
Stephane Nicoll 9763ba56ba Start building against Spring Framework 5.2.12 snapshots
See gh-24276
2020-11-30 16:04:27 +01:00
Andy Wilkinson 1f3012b466 Merge branch '2.3.x'
Closes gh-24220
2020-11-20 11:36:45 +00:00
Andy Wilkinson 0ed7f7f40a Merge branch '2.2.x' into 2.3.x
Closes gh-24219
2020-11-20 11:36:31 +00:00
Andy Wilkinson 08b9d1da57 Polish "Ensure that MeterRegistry bean is defined before SI looks for it"
See gh-24095
2020-11-20 11:20:31 +00:00
Artem Bilan 7d712aaa2d Ensure that MeterRegistry bean is defined before SI looks for it
Previously, it was possible for Spring Integration, including its
built-in Micrometer support, to be auto-configured before the
Micrometer auto-configuration had defined the MeterRegistry bean. This
resulted in missing Spring Integration metrics.

Spring Integration is unusual in having its own built-in Micrometer
support that it configures itself. Rather than providing
auto-configuration for Integration's Micrometer support (Which isn't
needed), this commit introduces some auto-configuration that just
affects the ordering of the auto-configuration classes. This ordering
ensures that the MeterRegistry bean has been defined by Spring
Integration is auto-configured. This ensures that the MeterRegistry
bean is known to the BeanFactory when Spring Integration goes looking
for it.

See gh-24095
2020-11-20 11:18:09 +00:00
Andy Wilkinson 699f03d5a6 Merge branch '2.3.x'
Closes gh-24010
2020-11-03 14:04:38 +00:00
Andy Wilkinson 2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
2020-11-03 14:04:08 +00:00
Andy Wilkinson 30a0ccab02 Remove use of `@PostConstruct` from main code
When running on Java 11 (where `@PostConstruct` is no longer part of
the JRE) and without a dependency on jakarta-annotation-api,
`@PostContruct` annotions are silently dropped. This leads to obscure and
hard-to-track down changes in the behaviour of our auto-configuration
as the `@PostConstruct`-annotated methods are not invoked.

To allow users to run on Java 11 without having jakarta-annotation-api
on the classpath, this commit removes use of `@PostConstruct` from main
code. A Checkstyle rule has also been added to prevent its usage in
main code from being reintroduced.

Closes gh-23723
2020-11-03 13:59:38 +00:00
Stephane Nicoll d951f28e16 Upgrade to Micrometer 1.6.0
Closes gh-23525
2020-10-29 18:58:32 +01:00
Andy Wilkinson b9516bc77c Await registration of http.server.requests meter
Previously, the test would make an HTTP request and, as soon as the
response was received, it would check the presence and value of the
http.server.requests meter. This create a race condition between the
meter being registered once the response had been flushed and the
meter's presence being checked. If the check won the race, the test
would fail.

This commit updates the test to wait for up to 5 seconds for the
meter to be present and have a count of 1, matching the single request
that has been made.

Fixes gh-23919
2020-10-27 15:54:22 +00:00
Phillip Webb ef89eb6dfb Add @ConditionalOnDefaultWebSecurity annotation
Add a dedicate condition annotation to detect when Spring Security is
available but has not been configured by the user. The new annotation
helps simplify quite a few of our auto-configuration classes.

See gh-23421
2020-10-26 23:47:14 -07:00
Madhura Bhave 0818f27f44 Configure WebSecurity using WebSecurityCustomizer
Replace `WebSecurityConfigurer` and `WebSecurityConfigurerAdapter`
configurations with `WebSecurityCustomizer` or `SecurityFilterChain`
beans.

Closes gh-23421
2020-10-26 23:47:14 -07:00
Andy Wilkinson abfdfc3e5f Merge branch '2.3.x'
Closes gh-23908
2020-10-26 14:45:18 +00:00
Andy Wilkinson c0bb6ff667 Await registration of http.server.requests meter
Previously, the test would make an HTTP request and, as soon as the
response was received, it would check the presence and value of the
http.server.requests meter. This create a race condition between the
meter being registered once the response had been flushed and the
meter's presence being checked. If the check won the race, the test
would fail.

This commit updates the test to wait for up to 5 seconds for the
meter to be present and have a count of 1, matching the single request
that has been made.

Fixes gh-23863
2020-10-26 14:41:58 +00:00
Andy Wilkinson 10f887a5ad Introduce management base-path property for servlet and reactive actuator
Previously, the base path of a servlet-based management server could be
configured using management.server.servlet.context-path but there was no
equivalent property for WebFlux.

This commit introduces a new property, management.server.base-path,
that can be used with both servlet and reactive management servers. The
existing servlet-specific property has been deprecated in favour of the
new general property. When using the servlet stack, if both the general
property and the servlet-specific property are set, the new general
property takes precedence. When using the reactive stack, only the new
general property is considered.

Closes gh-22906
2020-10-26 14:16:29 +00:00
Stephane Nicoll 9efff2af83 Merge branch '2.3.x'
Closes gh-23735
2020-10-20 10:08:21 +02:00
Stephane Nicoll f4e822f650 Prevent access to the EMF within the singleton lock
This commit makes sure to defer registration of hibernate statistics
outside of the singleton lock as it can lead to deadlocks when the
EntityManagerFactory is initialized in deferred mode.

Closes gh-23740
2020-10-20 09:59:07 +02:00
Stephane Nicoll b7a8b0f19b Hacking
See gh-23740
2020-10-20 09:32:40 +02:00
Andy Wilkinson 3f1f830efe Fail if management.server.address is set but actuator is on the same port
Closes gh-22187
2020-10-19 15:21:11 +01:00
Andy Wilkinson d005a64c9f Revert "Rename CompositeMeterRegistryAutoConfiguration"
This reverts commit 9460d74e8a.

Fixes gh-23724
2020-10-16 17:47:48 +01:00
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
2020-10-09 09:03:23 +02:00
Stephane Nicoll 35d41e4ae2 Remove code deprecated in Spring Boot 2.2
Closes gh-22034
2020-10-06 08:17:10 +02:00
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
2020-10-02 16:43:34 +02:00
Stephane Nicoll de32fab324 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 16:09:41 +02:00
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
2020-09-30 13:46:57 +02:00
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
2020-09-24 15:57:07 +02:00
Andy Wilkinson 6d2deb89dd Polish 2020-09-22 09:05:34 +01:00
Andy Wilkinson 9f21413000 Stop applying MeterFilters to auto-configured composite registry
Previously, all MeterFilter beans were applied to all MeterRegistry
beans. As a result, when a composite registry was auto-configured, both
the composite and all of its delegates would have the same MeterFilters
applied. This made it impossible for one of the delegate registries to
have a locally-configured filter that would allow a meter that would be
denied by one of the MeterFilter beans applied to the composite.

This commit update MeterRegistryConfigurer to skips the auto-configured
composite meter registry when applying MeterFilter beans to
MeterRegistry beans. As a result, the composite's filters will no
longer deny a meter before it reaches a delegate that would have
accepted it due to one of its locally-configured filters.

Closes gh-23381
2020-09-21 13:22:03 +01:00
Phillip Webb c284edde67 Update copyright year of changed files 2020-09-17 00:31:01 -07:00
Andy Wilkinson 9d3c718bf3 Merge branch '2.3.x'
Closes gh-23306
2020-09-15 12:32:28 +01:00
Andy Wilkinson 53f2966b61 Merge branch '2.2.x' into 2.3.x
Closes gh-23305
2020-09-15 12:30:45 +01:00
Andy Wilkinson 5d20660c8a Disable proxyBeanMethods on all management context config classes
Fixes gh-23301
2020-09-15 12:30:32 +01:00
Stephane Nicoll f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
2020-09-11 16:05:57 +02:00
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
2020-09-08 14:39:37 +02:00
Brian Clozel 8d27cac43e Polish
See gh-22358
2020-09-08 10:35:50 +02:00
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
2020-09-08 10:17:27 +02:00
Brian Clozel 1152a39caa Polish 2020-09-07 20:34:23 +02:00
Brian Clozel 8dcb3312f2 Switch startup actuator endpoint to using HTTP POST
Closes gh-23213
2020-09-07 20:32:26 +02:00
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
2020-09-07 18:04:48 +02:00
Stephane Nicoll f8bc656921 Polish "Removed some redundant 'else's using early return"
See gh-22528
2020-09-01 13:35:17 +02:00
Pradipta Sarma 2627bf896e Removed some redundant 'else's using early return
See gh-22528
2020-09-01 13:35:17 +02:00
Andy Wilkinson 627ede8bff Remove duplicate jackson-datatype-jsr310 dependency
Closes gh-23123
2020-08-28 12:38:42 +01:00
Phillip Webb aa2580bb51 Merge branch '2.3.x' 2020-08-18 15:39:08 -07:00
Phillip Webb ba2ab3363b Merge branch '2.2.x' into 2.3.x 2020-08-18 15:38:53 -07:00
Phillip Webb 60b5de192c Merge branch '2.2.x' into 2.3.x 2020-08-18 15:38:11 -07:00
Phillip Webb 4e76138ebc Update copyright year of changed files 2020-08-18 15:37:59 -07:00
Phillip Webb 9460d74e8a Rename CompositeMeterRegistryAutoConfiguration
Rename `CompositeMeterRegistryAutoConfiguration` to
`MeterRegistryAutoConfiguration` since it can also create non-composite
registries.

Closes gh-22988
2020-08-17 16:41:10 -07:00
Phillip Webb 12bae2ad52 Merge branch '2.3.x'
Closes gh-22990
2020-08-17 16:18:23 -07:00
Phillip Webb ff36f8bab8 Merge branch '2.2.x' into 2.3.x
Closes gh-22989
2020-08-17 16:17:47 -07:00
Phillip Webb 10da595302 Polish 'Order metrics auto-configurations correctly'
See gh-21134
2020-08-17 16:10:18 -07:00
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
2020-08-17 16:03:27 -07:00
Madhura Bhave bbbbe8e4d2 Make security auto-configs back off when SecurityFilterChain present
Closes gh-22739
2020-08-14 12:24:25 -07:00
Stephane Nicoll 42ca62b2e7 Merge branch '2.3.x'
Closes gh-22931
2020-08-13 11:49:03 +02:00
Stephane Nicoll df78105a3c Merge branch '2.2.x' into 2.3.x
Closes gh-22930
2020-08-13 11:48:43 +02:00
Stephane Nicoll f61a632a37 Polish "Fix conditions that lead to auto-configure PushGateway"
See gh-22919
2020-08-13 11:47:43 +02:00
smlc c355b95f6c Fix conditions that lead to auto-configure PushGateway
See gh-22919
2020-08-13 11:41:49 +02:00
Stephane Nicoll 14eb041086 Polish "Add basic auth support for Prometheus pushgateway"
See gh-22548
2020-08-12 10:27:07 +02:00
AndrewDi 9ddc97f815 Add basic auth support for Prometheus pushgateway
See gh-22548
2020-08-12 09:54:08 +02:00
Andy Wilkinson e358144b2e Polish "Exclude cookie headers by default from HTTP traces"
See gh-22829
2020-08-11 15:58:55 +01:00
Emily Tsanova 5ff515727d Exclude cookie headers by default from HTTP traces
See gh-22829
2020-08-11 15:58:55 +01:00
Andy Wilkinson abf6123bae Upgrade to Kafka 2.5.1
Closes gh-22868
2020-08-11 12:50:15 +01:00
Andy Wilkinson 969dd35e45 Upgrade to Mockito 3.4.6
Closes gh-22838
2020-08-10 15:22:03 +01:00
Andy Wilkinson 0ffe51bb62 Merge branch '2.3.x'
Closes gh-22820
2020-08-07 11:31:03 +01:00
Andy Wilkinson be32843dab Configure generated snippets as inputs to the Asciidoctor tasks
Closes gh-22819
2020-08-07 11:28:58 +01:00
Madhura Bhave 6d82e9e97f Merge branch '2.3.x'
Closes gh-22775
2020-08-06 18:00:05 -07:00
Madhura Bhave 3f82ca40e2 Merge branch '2.2.x' into 2.3.x
Closes gh-22774
2020-08-06 17:59:30 -07:00
Madhura Bhave f39f33bb8d Fix documentation related to the health endpoint's inner details
Closes gh-22490
2020-08-06 17:57:56 -07:00
Phillip Webb f7f4ff0ac9 Update copyright year of changed files 2020-08-06 14:35:43 -07:00
Stephane Nicoll dac63fc3e5 Polish 2020-08-06 17:35:01 +02:00
Andy Wilkinson 0e83b2f4c4 Merge branch '2.3.x'
Closes gh-22747
2020-08-05 17:47:38 +01:00
Andy Wilkinson c40835eba0 Merge branch '2.2.x' into 2.3.x
Closes gh-22746
2020-08-05 17:47:24 +01:00
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
2020-08-05 17:37:44 +01:00
Stephane Nicoll 516582f6d3 Merge branch '2.3.x'
Closes gh-22744
2020-08-05 18:05:07 +02:00
Andy Wilkinson bc44cd6705 Polish 2020-08-04 18:43:45 +01:00
Andy Wilkinson 7f53aef568 Upgrade to Kafka 2.6.0
Closes gh-22731
2020-08-04 18:14:23 +01:00
Brian Clozel fb1234a22c Upgrade to Reactor 2020.0.0 SNAPSHOTs
See gh-22667
2020-08-04 13:26:47 +02:00
Brian Clozel 6efff7b585 Merge branch '2.3.x'
Closes gh-22698
2020-08-01 21:11:28 +02:00
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
2020-08-01 20:57:34 +02:00
Madhura Bhave 4b2c94cb2b Allow exclude only health groups
Closes gh-22053
2020-07-28 12:36:24 -07:00
Stephane Nicoll c6fde1e4d5 Polish "Update Neo4j health check to use the Neo4j Driver"
See gh-22302
2020-07-28 16:36:58 +02:00
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
2020-07-28 16:31:35 +02:00
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
2020-07-28 16:26:11 +02:00
Andy Wilkinson ce7210c4f0 Merge branch '2.1.x' into 2.2.x
Closes gh-22563
2020-07-25 09:06:11 +01:00
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
2020-07-25 08:26:15 +01:00
Stephane Nicoll 42155321cb Merge branch '2.3.x'
Closes gh-22561
2020-07-25 07:20:50 +02:00
Stephane Nicoll 7ed54bda96 Fix typo for management.health.readinessstate.enabled
Closes gh-22560
2020-07-25 07:20:06 +02:00
Stephane Nicoll 3530ac9b0c Polish "Disable metrics export in integration tests"
See gh-21658
2020-07-24 15:43:17 +02:00
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
2020-07-24 15:43:17 +02:00
Phillip Webb 3d7d9d064c Update copyright year of changed files 2020-07-22 18:50:07 -07:00
Andy Wilkinson 0ac7178ae1 Merge branch '2.3.x'
Closes gh-22491
2020-07-22 06:43:28 +01:00
dreis2211 198131f5e4 Remove redundant compiler arguments in Gradle build files
See gh-22488
2020-07-22 06:42:48 +01:00
Andy Wilkinson 8799033801 Merge branch '2.3.x' 2020-07-22 06:26:44 +01:00
Andy Wilkinson 2063c242ae Polish 2020-07-22 06:25:55 +01:00
Brian Clozel 1d95e2f504 Merge branch '2.3.x'
Closes gh-22483
2020-07-21 16:24:37 +02:00
Brian Clozel fe807d6c0b Improve liveness/readiness health config
Prior to this commit, the application availability infrastructure
would mix the `AvailabilityState`, the `HealthIndicator` and the
`HealthGroup` concepts and would not align with the rest.

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

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

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

Closes gh-22107
2020-07-21 16:03:06 +02:00
Andy Wilkinson b627918011 Polish "Optionally ignore routing data sources when creating DB health indicators"
See gh-22222
2020-07-07 09:42:36 +01:00
Julio Gomez Diaz 13d1d2393d Optionally ignore routing data sources when creating DB health indicators
See gh-22222
2020-07-07 09:36:06 +01:00
Andy Wilkinson b356bc830d Merge branch '2.3.x' 2020-07-06 09:47:08 +01:00
Andy Wilkinson dfea2f432a Polish
See gh-21921
2020-07-06 09:41:39 +01:00
Brian Clozel 3f93978e99 Merge branch '2.3.x'
Closes gh-22215
2020-07-03 15:52:35 +02:00
Brian Clozel 86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
2020-07-03 15:25:18 +02:00
Aleksander Lech 203878a16f Add support for reactive Elasticsearch healthcheck
Prior to this commit, configuring a reactive Elasticsearch client would
auto-configure an Actuator Health check using a synchronous client, with
the default configuration properties (so tarting localhost:9200).

This would lead to false reports of unhealthy Elasticsearch clusters
when using reactive clients.

This commit reproduces the logic for MongoDB repositories: if a reactive
variant is available, it is selected for the health check
infrastructure.

See gh-21042
2020-07-03 15:16:38 +02:00
Andy Wilkinson d85774ea77 Merge branch '2.3.x'
Closes gh-22196
2020-07-02 09:32:11 +01:00
Eddú Meléndez 54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
2020-07-01 14:03:11 +01:00
Andy Wilkinson 77eb5f7794 Polish "Add StatsD transport protocol configuration option"
See gh-22125
2020-06-29 09:47:17 +01:00
Lee Dobryden 5d41f60e45 Add StatsD transport protocol configuration option
See gh-22125
2020-06-29 09:47:08 +01:00
Phillip Webb efe84356b7 Merge branch '2.3.x'
Closes gh-22064
2020-06-22 23:16:02 -07:00
Phillip Webb 03b0a373ab Merge branch '2.2.x' into 2.3.x
Closes gh-22063
2020-06-22 23:15:48 -07:00
Phillip Webb e6eb02603c Polish 'Inherit show-details property in health groups'
Rework the inheritance so that the property metadata JSON more
accurately reflects the default value.

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

See gh-22022
2020-06-22 22:54:34 -07:00
Andy Wilkinson 9e08490522 Merge branch 'gh-21271'
Closes gh-21271
2020-06-16 12:52:17 +01:00
Andy Wilkinson 753bea64c6 Enable varargs compilation warnings
See gh-21271
2020-06-16 12:50:53 +01:00
Andy Wilkinson 9636350b0b Enable rawtypes compilation warnings
See gh-21271
2020-06-16 12:50:50 +01:00
Andy Wilkinson 056d5f3120 Enable deprecation compilation warnings
See gh-21271
2020-06-16 12:50:47 +01:00
Andy Wilkinson 07fb4b065d Merge branch '2.3.x'
Closes gh-21940
2020-06-16 10:10:38 +01:00
Andy Wilkinson 0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
2020-06-16 08:50:21 +01:00
Stephane Nicoll 35e069e2cd Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
2020-06-15 11:13:13 +02:00
Alexandre Dutra dad9ec86d5 Add health indicator for Cassandra that uses the CqlSession
This commit provides a CassandraDriverHealthIndicator and
CassandraDriverReactiveHealthIndicator that do not require Spring Data.
As a result, a health indicator for Cassandra is provided even if the
application does not use Spring Data.

See gh-20887
2020-06-15 11:13:13 +02:00
Scott Frederick 9ae6816785 Merge branch '2.3.x'
Closes gh-21874
2020-06-10 13:57:06 -05:00
Scott Frederick 7a793a11fb Merge branch '2.2.x' into 2.3.x
Fixes gh-21036 in 2.3.1
2020-06-10 13:55:12 -05:00
Scott Frederick 0fa1d0ef2e Handle bind exceptions in management context
This commit updates the logic for handling binding exceptions in the
management context when it is separate from the application context.
The changes allow the exception details to be visible to
DefaultErrorAttributes without causing the servlet container to
detect an error condition.

Fixes gh-21036
2020-06-10 13:53:04 -05:00
Phillip Webb 8a7a5929ae Merge branch '2.3.x' 2020-06-05 15:37:33 -07:00
Phillip Webb cc50605687 Merge branch '2.2.x' into 2.3.x 2020-06-05 15:36:44 -07:00
Phillip Webb 0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Stephane Nicoll da5e8d70a1 Polish "Support filtered scrape for Prometheus"
See gh-21545
2020-06-05 14:16:42 +02:00
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
2020-06-05 14:16:42 +02:00
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
2020-06-04 20:25:29 +01:00
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
2020-06-03 12:55:11 +01:00
Madhura Bhave d3f72326d0 Merge branch '2.2.x' into 2.3.x
Closes gh-21642
2020-06-01 13:49:59 -07:00
Madhura Bhave 573cb98d90 Make management security configuration back off when SAML present
Fixes gh-21620
2020-06-01 13:39:46 -07:00
Stephane Nicoll 069c31a074 Map connection and read timeouts for New Relic again
Closes gh-21440
2020-05-26 15:20:33 +02:00
Phillip Webb fd505e516f Merge branch '2.2.x'
Closes gh-21444
2020-05-13 19:11:29 -07:00
Phillip Webb 49a21ded7a Create endpoint beans as late as possible
Update `EndpointDiscoverer` so that `@Endpoint` and `@EndpointExtension`
beans are created as late as possible.

Prior to this commit, endpoint beans and extension beans would be
created during the discovery phase which could cause early bean
initialization. The problem was especially nasty when using an embedded
servlet container since `ServletEndpointRegistrar` is loaded as the
container is initialized. This would trigger discovery and load all
endpoint beans, including the health endpoint, and all health indicator
beans.

Fixes gh-20714
2020-05-13 19:10:54 -07:00
Phillip Webb 038ae93406 Update copyright year of changed files 2020-05-13 16:48:51 -07:00
Phillip Webb 12381467da Polish 2020-05-13 16:48:51 -07:00
Phillip Webb 6a1f61c1bf Merge branch '2.2.x' 2020-05-13 12:23:10 -07:00
Phillip Webb 5157a75119 Polish 2020-05-13 11:36:02 -07:00
Stephane Nicoll 23c5549832 Polish 2020-05-13 15:39:44 +02:00
Andy Wilkinson a03426af57 Configure the Asciidoctor revnumber in a central location
See gh-20934
2020-05-13 08:16:59 +01:00
Madhura Bhave 376098d080 Set asciidoctor revnumber to null
Closes gh-20934
2020-05-12 14:58:38 -07:00
Scott Frederick 0d00947735 Closes gh-21428 2020-05-12 13:50:16 -05:00
Scott Frederick 6b8d08a6e3 Handle exceptions in management context
Prior to this commit, details about an exception would get dropped when
the management context was separate from the application context and
an actuator endpoint threw a binding exception.

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

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

Fixes gh-21324
2020-05-11 15:36:24 -05:00
Andy Wilkinson f6d8c7d23c Simplify ReactiveWebServerApplicationContext.ServerManager
Closes gh-21315
2020-05-05 15:04:09 +01:00
Phillip Webb d52bf83ab2 Polish 2020-04-30 16:40:05 -07:00
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
2020-04-29 17:56:47 -05:00
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>
2020-04-29 17:53:08 +01:00
dreis2211 c1c90b11b8 Fix some deprecations
See gh-21212
2020-04-29 15:10:30 +02:00
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
2020-04-28 21:01:14 +02:00
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
2020-04-27 12:06:26 +02:00
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
2020-04-26 22:10:39 +02:00
Johnny Lim ef567388c1 Polish
See gh-21110
2020-04-25 09:04:10 +02:00
dreis2211 667033c149 Fix Actuator API PDF name
See gh-21054
2020-04-25 08:59:00 +02:00
dreis2211 5eb5bf0a2d Polish
See gh-21009
2020-04-25 08:54:47 +02:00
Stephane Nicoll 85e9f713b0 Update copyright year of changed files
See gh-21007
2020-04-25 08:50:51 +02:00
Johnny Lim 29717423a3 Remove this keyword on member method invocations
See gh-21007
2020-04-25 08:49:44 +02:00
Stephane Nicoll ddcd1bc7bb Remove metadata for configuration keys that were removed in 2.0
Closes gh-19706
2020-04-23 16:14:13 +02:00
Stephane Nicoll 623fbcbf8c Polish 2020-04-23 15:20:47 +02:00
Stephane Nicoll 1019dbbc47 Merge branch '2.2.x'
Closes gh-21100
2020-04-23 15:00:22 +02:00
Stephane Nicoll 8ac3ab5551 Add missing metadata for removed configuration keys
Closes gh-20846
2020-04-23 14:39:10 +02:00
Stephane Nicoll 6c02daf2bc Merge branch '2.2.x'
Closes gh-21098
2020-04-23 14:12:37 +02:00
Stephane Nicoll 311952730e Merge branch '2.1.x' into 2.2.x
Closes gh-21097
2020-04-23 14:07:31 +02:00
Stephane Nicoll 291165f060 Order additional metadata according to lexicographic order
Closes gh-21095
2020-04-23 13:58:49 +02:00
Andy Wilkinson d05c973e71 Polish 2020-04-23 11:49:07 +01:00
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
2020-04-23 10:13:17 +02:00
Phillip Webb 56711d678a Merge branch '2.2.x'
Closes gh-21083
2020-04-22 11:59:22 -07:00
Phillip Webb 102729b5e1 Merge branch '2.1.x' into 2.2.x
Closes gh-21082
2020-04-22 11:58:39 -07:00
Phillip Webb b3d33754a5 Remove outdated FIXMEs from tests
Closes gh-19782
2020-04-22 11:55:35 -07:00
Andy Wilkinson ab82e59aa1 Polish "Improve property name in thrown Micrometer ValidationException"
See gh-21069
2020-04-22 10:16:38 +01:00
Jon Schneider 507b062c43 Improve property name in thrown Micrometer ValidationException
See gh-21069
2020-04-22 10:03:50 +01:00
Stephane Nicoll f0fe7060df Polish 2020-04-22 10:47:18 +02:00
Phillip Webb bf41da5322 Update copyright year of changed files 2020-04-21 18:12:27 -07:00
Andy Wilkinson 60a76ce6e7 Polish "Update validation of Micrometer configuration"
See gh-21067
2020-04-21 18:06:43 +01:00
Jon Schneider 95798265b6 Update validation of Micrometer configuration
See gh-21067
2020-04-21 18:06:36 +01:00
Andy Wilkinson 8de0027757 Merge branch '2.2.x'
Closes gh-21062
2020-04-21 13:27:48 +01:00
Andy Wilkinson 3065c88d6f Fix typo in IncludeExcludeEndpointFilter's name
Closes gh-21061
2020-04-21 13:27:35 +01:00
Phillip Webb 49d20aea11 Merge branch '2.2.x'
Closes gh-21047
2020-04-20 13:11:26 -07:00
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
2020-04-20 13:10:59 -07:00
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
2020-04-20 12:20:46 +02:00
Phillip Webb 0ad1ea4352 Merge branch '2.2.x' 2020-04-19 16:52:48 -07:00
Phillip Webb 83553ee504 Fix test checkstyle issues
Fix checkstyle issues from forward merge.

See gh-21022
2020-04-19 16:51:59 -07:00
Phillip Webb 2293cb1a41 Merge branch '2.2.x'
Closes gh-21023
2020-04-19 16:05:00 -07:00
Phillip Webb 5757c0864c Merge branch '2.1.x' into 2.2.x
Closes gh-21022
2020-04-19 16:03:49 -07:00
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
2020-04-19 15:58:20 -07:00
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
2020-04-19 16:35:16 +02:00
Phillip Webb e3b8478621 Polish 2020-04-17 16:12:11 -07:00
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
2020-04-16 16:48:22 -05:00
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
2020-04-16 10:46:36 -05:00
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
2020-04-14 16:40:36 -07:00
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
2020-04-14 16:40:36 -07:00
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
2020-04-14 16:40:36 -07:00
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
2020-04-14 16:40:36 -07:00
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
2020-04-14 16:40:36 -07:00
Vedran Pavic fec386b574 Harmonize naming of Elasticsearch auto-configuration classes 2020-04-11 10:00:42 +02:00
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
Stephane Nicoll 9aef2bde77 Merge branch '2.2.x'
Closes gh-20030
2020-02-04 10:09:11 +01:00
Stephane Nicoll 10643b7702 Polish "Stop time web metrics when autotime is disabled"
See gh-19981
2020-02-04 10:03:08 +01:00
babjo e323e05eea Stop time web metrics when autotime is disabled
See gh-19981
2020-02-04 09:50:49 +01:00
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.
2020-02-03 17:07:56 -06:00
Scott Frederick de1a26cf35 Revert "Remove deprecated HealthIndicator and HealthAggregator 2.2 code"
This reverts commit df1837a16b.
2020-02-03 14:02:39 -06:00
dreis2211 2d9902f10e Fix link to Spring Integration Graph documentation
See gh-19992
2020-02-03 17:32:02 +01:00
Stephane Nicoll 90e3d88793 Fix link to Spring Integration Graph documentation
Closes gh-20023
2020-02-03 17:30:37 +01:00
Stephane Nicoll c4daff7225 Polish "Upgrade to MongoDB Java Driver 4.0 beta1"
See gh-19960
2020-02-03 14:12:46 +01:00
Christoph Strobl d2d6dbdc00 Upgrade to MongoDB Java Driver 4.0 beta1
See gh-19960
2020-02-03 10:59:30 +01:00
dreis2211 56df70b0e7 Use Spring 5 module of Jersey
See gh-20009
2020-02-03 09:34:57 +01:00
Johnny Lim 0ddf8be151 Polish
See gh-20001
2020-02-01 16:13:51 +01:00
dreis2211 fac6f08ca3 Use new AssertJ duration assertions
See gh-19985
2020-01-30 08:14:49 +01:00
Stephane Nicoll eb852f1ad6 Disable bean overriding by default in ApplicationContextRunner
For consistency with SpringApplication, this commit disables bean
overriding by default in ApplicationContextRunner. Bean overriding can
be enabled again using withAllowBeanDefinitionOverriding.

Closes gh-18019
2020-01-28 15:57:28 +01:00
wonwoo 8703c04475 Register Stackdriver auto-config in `META-INF/spring.factories`
See gh-19955
2020-01-28 10:49:59 +01:00
Phillip Webb e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
2020-01-22 16:02:38 -08:00
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
Phillip Webb bfd2ca7fd9 Polish Gradle expression references
Expand all expression `$` references to the full `${...}` form.
2020-01-21 18:33:33 -08:00
Stephane Nicoll 08967bca3e Merge branch '2.2.x'
Closes gh-19843
2020-01-21 14:44:01 +01:00
Stephane Nicoll 84324c438b Merge branch '2.1.x' into 2.2.x
Closes gh-19842
2020-01-21 14:34:44 +01:00
Stephane Nicoll 34c263a828 Polish actuator dependencies and test resources
This commit removes references of cache infra following the move to
Micrometer. We no longer ships an infinispan specific binder so the
dependency has been removed as well.

Closes gh-19838
2020-01-21 14:20:28 +01:00
Scott Frederick 8f102aee68 Remove deprecated 2.2 code
See gh-19699
2020-01-16 14:44:52 +01:00
Scott Frederick 2e32cb2af1 Remove deprecated HealthIndicator and HealthAggregator 2.2 code
See gh-19699
2020-01-16 14:44:51 +01:00
Scott Frederick 1f1b06dfe2 Remove deprecated Actuator metrics 2.2 code
See gh-19699
2020-01-16 14:44:09 +01:00
Scott Frederick 7031a3b17d Remove deprecated logging properties
See gh-19699
2020-01-16 14:35:41 +01:00
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
2020-01-15 15:09:58 +00:00
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
2020-01-15 12:33:18 +00:00
Andy Wilkinson aefe52e4d0 Revert "Rework dep management to avoid consumers picking up strict constraints"
This reverts commit b34a311d02 as,
having disabled the publishing of Gradle's module metadata (4f75ab5),
the changes are no longer needed.

See gh-19609
2020-01-14 12:15:53 +00:00
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 2020-01-13 17:03:51 -08:00
Phillip Webb 15652ae4c1 Update copyright year of changed files 2020-01-13 16:47:17 -08:00
Phillip Webb f57281340c Merge branch '2.2.x' 2020-01-13 16:46:49 -08:00
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 2020-01-13 16:45:40 -08:00
Madhura Bhave d1f51e064b Merge branch '2.2.x'
Closes gh-19701
2020-01-13 14:15:01 -08:00
Madhura Bhave e60194c7d5 Ignore trailing slash when recording Web metrics
Fixes gh-18207
2020-01-13 14:14:28 -08:00
Phillip Webb 9bd49562fe Update copyright year of changed files 2020-01-13 14:09:11 -08:00
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
2020-01-13 21:03:12 +01:00
Andy Wilkinson b34a311d02 Rework dep management to avoid consumers picking up strict constraints
Previously, enforcedPlatform dependencies were using to pull in the
constraints defined in spring-boot-dependencies and
spring-boot-parent and applied them strictly so that the constrained
version had to be used. This worked as intended in Spring Boot's own
build but incorrectly enforced those same strict version requirements
on external consumers of Spring Boot's modules.

This commit reworks how Spring Boot defines its internal dependency
management so that platform dependencies are exposed to external
consumers while enforced platform dependencies are using internally.

See gh-19609
2020-01-13 19:59:56 +00:00
Brian Clozel b780e5247c Remove support for Elasticsearch transport client
The Elasticsearch transport client has been deprecated since Spring Boot
2.2.0 and is about to be removed from Spring Data Elasticsearch and
Elasticsearch itself in their next major releases.

The available REST client support variants are now the preferred way of
using Elasticsearch features.

Closes gh-19668
2020-01-13 16:00:18 +01:00
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
2020-01-13 15:12:41 +01:00
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
2020-01-10 14:15:35 +00:00
Stephane Nicoll 462442e7d2 Polish "Add Stackdriver metrics export support"
See gh-19528
2020-01-08 13:35:44 +01:00
Johannes Graf d42256d856 Add Stackdriver metrics export support
See gh-19528
2020-01-08 13:32:27 +01:00
Andy Wilkinson cbacb6116b Merge branch '2.2.x'
Closes gh-19568
2020-01-08 11:15:59 +00:00
Andy Wilkinson e04055650c Merge branch '2.1.x' into 2.2.x
Closes gh-19567
2020-01-08 11:15:29 +00:00
Andy Wilkinson 3fb1bb74ba Configure WebTestClient to be able to consume large responses
Closes gh-19566
2020-01-08 11:14:42 +00:00
Stephane Nicoll 6fc52b0563 Polish 2020-01-01 09:16:53 +01:00
Stephane Nicoll 2c1e81adf0 Polish 2019-12-26 10:42:40 +01:00
Stephane Nicoll bb3b6dbd7d Merge branch '2.2.x'
Closes gh-19375
2019-12-15 09:05:27 +09:00
dreis2211 b6e4c0f012 Add group property to DynatraceProperties
See gh-19369
2019-12-15 08:54:42 +09:00
Madhura Bhave 8dcf1e4033 Provide end-to-end traceability for config properties
Closes gh-14880

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2019-12-12 17:02:46 -08:00
dreis2211 aea37b5d81 Fix deprecation info in CompositeHealthIndicatorConfiguration
See gh-19180
2019-11-28 16:50:46 +01:00
Johnny Lim f234d9c0ec Remove ConditionEvaluationReportLoggingListener usage if possible
See gh-19159
2019-11-27 13:49:27 +01:00
thelproad 65ab82b3cd Remove redundant code
See gh-19000
2019-11-23 12:01:19 +01:00
Madhura Bhave 6e22ddc1a6 Merge branch '2.1.x' into 2.2.x 2019-11-19 12:09:49 -08:00
Madhura Bhave ff22bd4827 Merge branch '2.1.x' into 2.2.x
Closes gh-19059
2019-11-19 11:52:26 -08:00
Johnny Lim ddb22f5a52 Polish test methods
See gh-18962
2019-11-12 14:09:44 +01:00
wycm 363399ce4a Add missing reference to HazelcastHealthContributorAutoConfiguration
See gh-18847
2019-11-04 10:14:54 +01:00
Phillip Webb ae5ae72889 Add and adapt reactive health contributors
Update `HealthEndpointConfiguration` to also include adapted reactive
health contributors when project reactor is on the classpath. Prior to
this commit, reactive contributors were only exposed in WebFlux
applications. This was a regression from Spring Boot 2.1 that we didn't
catch because all our own reactive contributors all have non-reactive
equivalents.

Closes gh-18805
2019-10-30 15:12:28 -07:00
Phillip Webb b3e9a06476 Polish 2019-10-30 15:02:14 -07:00
Stephane Nicoll a83852b7cc Consistently clean actuator endpoint ids
Closes gh-18649
2019-10-29 10:03:18 +01:00
Stephane Nicoll d7652e8f14 Make sure Reactive health indicators take precedence
This commit restores the highest precedence of reactive
HealthContributor over imperative one. Previously, both would be
registered, leading to duplicate entries in health output.

Closes gh-18748
2019-10-28 12:24:09 +01:00
dreis2211 9ece2e277f Remove redundant explicit types
See gh-18754
2019-10-27 08:33:01 +01:00
Phillip Webb 597baf9774 Polish "Optimize logger calls"
See gh-18710
2019-10-23 21:00:05 -07:00
wycm 240b1f9e29 Optimize logger calls
Guard logger calls to ensure that they are only made when the
level is set.

See gh-18710
2019-10-23 20:59:11 -07:00
Phillip Webb c5138c56ff Restore AbstractRoutingDataSource health support
Update `DataSourceHealthContributorAutoConfiguration` so that any
`AbstractRoutingDataSource` beans are still included in the overall
health. Prior to this commit, a regression in Spring Boot 2.2 meant
that if a single routing bean was found an `IllegalArgumentException`
would be thrown.

In Spring Boot 2.1 all `AbstractRoutingDataSource` would be filtered
from the results, but if no results existed the following was returned:

  "details": {
    "db": {
      "status": "UNKNOWN"
    },

In Spring Boot 2.2 we now always include routing datasource beans, even
if other non-routing database beans are found. The health details
includes `"routing" : true` to help users disambiguate any results.

Fixes gh-18661
2019-10-23 15:14:51 -07:00
dreis2211 8ecdf919f8 Fix Mockito deprecations
See gh-18689
2019-10-23 09:49:33 +02:00
Andy Wilkinson cf62dc862b Polish "Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration"
See gh-18571
2019-10-14 09:34:53 +01:00
dreis2211 35dc4817dd Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration
See gh-18571
2019-10-14 09:34:10 +01:00
Johnny Lim d60d59434d Polish
See gh-18531
2019-10-11 10:29:22 -05:00
Phillip Webb 946202bd42 Polish 'Support 'New Relic' eventType properties'
See gh-18472
2019-10-02 22:12:53 -07:00
Neil Powell e73ae62621 Support 'New Relic' eventType properties
Update `NewRelicProperties` so that the event type sent with each
metric can be configured. An additional `boolean` property has
also been added if the previous behavior using the "meter-name"
is required.

NewRelic's own agents publish metrics to eventTypes aligned with broader
categories. To align with their recommendation the default behavior is
to publish metrics under a "SpringBootSample" category. When doing so,
additional context is provided by including "metricName" and
"metricType" attributes.

See gh-18472
2019-10-02 22:08:14 -07:00
Andy Wilkinson dab69cfbd2 Upgrade to Promethus Pushgateway 0.7.0
Closes gh-18418
2019-10-02 11:26:47 +01:00
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
2019-10-02 10:48:57 +01:00
Andy Wilkinson 3d4157ad6d Correct SCM URLs in published poms
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.

This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.

Fixes gh-18328
2019-10-02 10:48:30 +01:00
Phillip Webb a8139ba819 Merge branch '2.1.x' 2019-10-01 11:39:46 -07:00
Phillip Webb 40acbfc733 Update copyright header of changed files 2019-10-01 11:39:38 -07:00
Phillip Webb 262eb686d0 Merge branch '2.1.x'
Closes gh-18468
2019-10-01 11:34:56 -07:00
Madhura Bhave ecf393461e Skip management context ResourceConfigCustomizers
Update `JerseyManagementContextConfiguration` so that customizer beans
are not longer applied. The endpoint resource endpoints are now added
with a registrar bean `@PostConstruct` method.

Prior to this commit, when running the management server on a different
port a `Resource` added by a customizer could be added two different
`ResourceConfig` instance. This breaks the singleton contract expected
by Jersey.

Fixes gh-17801

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
2019-10-01 11:16:23 -07:00
Stephane Nicoll a36d2cd159 Upgrade to micrometer 1.3.0
Closes gh-18389
2019-10-01 11:15:07 +02:00
Stephane Nicoll d2273bd68e Remove endpoint ID hints from metadata
Closes gh-18381
2019-09-30 12:56:34 +02:00
Phillip Webb 8f9fd97095 Don't reset defaults if source collection is empty
Update `LegacyHealthEndpointCompatibilityConfiguration` to ensure that
the default configuration is only overwritten when the user has
explicitly set new values.

Fixes gh-18354
2019-09-26 18:20:59 -07:00
Phillip Webb a94ab673a3 Add health endpoint 'show-components' support
Add a `show-components` property under `management.endpoint.health` and
`management.endpoint.health.group.<name>` that can be used to change
when components are displayed.

Prior to this commit it was only possible to set `show-details` which
offered an "all or nothing" approach to the resulting JSON. The new
switch allows component information to be displayed whilst still hiding
potentially sensitive details returned from the actual `HealthIndicator`.

Closes gh-15076
2019-09-26 16:17:28 -07:00
Phillip Webb 69c561a69a Rename health JSON 'details' to 'components' in v3
Update the health endpoint so the nested components are now exposed
under `components` rather than `details` when v3 of the actuator
REST API is being used.

This distinction helps to clarify the difference between composite
health (health composed of other health components) and health
details (technology specific information gathered by the indicator).

Since this is a breaking change for the REST API, it is only returned
for v3 payloads. Requests made accepting only a v2 response will have
JSON provided in the original form.

Closes gh-17929
2019-09-26 16:16:23 -07:00
Phillip Webb deb9d67cef Add Actuator ApiVersion support and bump version
Add `ApiVersion` enum that can be injected into actuator endpoints if
they need to support more than one API revision.

Spring MVC, WebFlux and Jersey integrations now detect the API version
based on the HTTP accept header. If the request explicitly accepts a
`application/vnd.spring-boot.actuator.v` media type then the version
is set from the header. If no explicit Spring Boot media type is
accepted then the latest `ApiVersion` is assumed.

A new v3 API revision has also been introduced to allow upcoming health
endpoint format changes. By default all endpoints now consume and
can produce v3, v2 and `application/json` media types.

See gh-17929
2019-09-26 16:16:15 -07:00
Phillip Webb 323a78c4b9 Add property to migrate deprecated endoint IDs
Allow legacy actuator endpoint IDs that contain dots to be transparently
migrated to the new format. This update will allow Spring Cloud users
to proactively migrate from endpoints such as `hystrix.stream` to
`hystrixstream`.

Closes gh-18148
2019-09-24 19:53:50 -07:00