Commit Graph

1678 Commits (541ab69affd9d47bb83adc679d72e44918a47164)

Author SHA1 Message Date
Phillip Webb 7e9ac39f0d Update copyright year of changed files 3 years ago
Andy Wilkinson 37f690323f Polish
Closes gh-27432
3 years ago
izeye 14d8c33125 Polish
See gh-27405
3 years ago
Andy Wilkinson 84455f86fd Polish "Add properties for Dynatrace metrics API v2 ingest with Micrometer" 3 years ago
Georg Pirklbauer 3161164912 Add properties for Dynatrace metrics API v2 ingest with Micrometer 3 years ago
Stephane Nicoll 36beca2c7d Add ERROR-level metadata for removed properties
See gh-27303
3 years ago
Stephane Nicoll dc5acb0019 Remove deprecated code flagged for removal
Closes gh-27303
3 years ago
Andy Wilkinson 75fdd89be4 Polish "Add resource labels to Stackdriver metrics configuration properties"
See gh-26961
3 years ago
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
3 years ago
Andy Wilkinson d21f8df1ad Polish "Auto-configure Jetty connection and SSL metrics"
See gh-26418
3 years ago
bono007 e6c43a32c8 Auto-configure Jetty connection and SSL metrics
See gh-26418
3 years ago
Andy Wilkinson 5c9f2668a5 Merge branch '2.5.x'
See gh-27168
3 years ago
Andy Wilkinson 6ed7e692a9 Merge branch '2.4.x' into 2.5.x
See gh-27163
3 years ago
Andy Wilkinson 1341ca99db Align with Framework's deprecation of getLastModified
See gh-27160
3 years ago
Stephane Nicoll 5bb6188f6d Merge branch '2.5.x'
Closes gh-27218
3 years ago
Stephane Nicoll 25fe6a107a Fix visibility of a type exposed as a bean
Closes gh-27189
3 years ago
Stephane Nicoll 786d7cdb6e Merge branch '2.5.x'
Closes gh-27118
3 years ago
dreis2211 c852961011 Avoid reflection in tests
See gh-27085
3 years ago
Andy Wilkinson 0ec598c99d Merge branch '2.5.x' 3 years ago
Andy Wilkinson 9e2339b5d0 Merge branch '2.4.x' into 2.5.x 3 years ago
Andy Wilkinson bc715c64b1 Merge branch '2.5.x'
Closes gh-26892
3 years ago
Andy Wilkinson 5f26fd9ccb Merge branch '2.4.x' into 2.5.x
Closes gh-26891
3 years ago
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
3 years ago
Stephane Nicoll f8555b9071 Add metrics for task execution and scheduling
Closes gh-23818
3 years ago
Stephane Nicoll a90c7181b7 Polish "Add auto-configuration for DiskSpaceMetrics"
See gh-26001
3 years ago
bono007 e3f03dd50a Add auto-configuration for DiskSpaceMetrics
See gh-26001
3 years ago
Andy Wilkinson de410b7621 Merge branch '2.4.x'
Closes gh-26828
3 years ago
Andy Wilkinson a1c5fcca58 Move common Asciidoctor configuration into our conventions
Closes gh-26620
3 years ago
Phillip Webb 4d62e47c5d Merge branch '2.3.x' into 2.4.x 3 years ago
Phillip Webb 9e1c78da99 Update copyright year of changed files 3 years ago
Stephane Nicoll b8b0430139 Merge branch '2.4.x'
Closes gh-26697
4 years ago
Stephane Nicoll 7f5adb7e9d Merge branch '2.3.x' into 2.4.x
Closes gh-26696
4 years ago
Stephane Nicoll 67fe60ba8a Add missing static on JerseyInfrastructureConfiguration
Closes gh-26695
4 years ago
Andy Wilkinson 7a7050879c Avoid eager initialization when configuring Data repository metrics
Fixes gh-26630
4 years ago
Phillip Webb ab958d2394 Include io.spring.asciidoctor.backends group
Update `repositories` declaration to include the
'io.spring.asciidoctor.backends' group.

See gh-26293
4 years ago
Phillip Webb f692b0e937 Rework title anchors for actuator docs
Closes gh-26615
4 years ago
Phillip Webb 2dbf39c738 Polish asciidoc formatting 4 years ago
Madhura Bhave a28072bab4 Merge branch '2.4.x' into main
Closes gh-26614
4 years ago
Madhura Bhave 27fee5fa95 Configure filter to process preflight requests for webflux actuator endpoints
Fixes gh-24541
4 years ago
Madhura Bhave 99ed291184 Merge branch '2.4.x' into main 4 years ago
Madhura Bhave 29d1e22b91 Fix rawtypes 4 years ago
Madhura Bhave 3ef9b7e634 Merge branch '2.4.x' into main
Closes gh-26612
4 years ago
Madhura Bhave 743ac4c394 Merge branch '2.3.x' into 2.4.x
Closes gh-26611
4 years ago
Madhura Bhave b26e842050 Configure CORS in default security configuration for MVC
Fixes gh-11987
4 years ago
Phillip Webb 8a3f835ffe Set Asciidoctor attribute-missing to warn
Closes gh-26590
4 years ago
Phillip Webb 0c8d819150 Merge branch '2.4.x'
Closes gh-26584
4 years ago
Phillip Webb 0699fdcc8a Polish 'Allow remote devtools access with Spring Security'
See gh-25868
4 years ago
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
4 years ago
Stephane Nicoll d3c817b7ba Polish "Remove unnecessary throws declaration in tests"
See gh-26441
4 years ago
weixsun 8a2be288a3 Remove unnecessary throws declaration in tests
See gh-26441
4 years ago
Phillip Webb 83668f96af Merge branch '2.4.x'
Closes gh-26458
4 years ago
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
4 years ago
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
4 years ago
izeye 996472b42d Polish
See gh-26145
4 years ago
Phillip Webb beaf03a008 Update copyright year of changed files 4 years ago
izeye e27c85698d Polish
See gh-26135
4 years ago
izeye fb5a1270e8 Add RepositoryMetricsAutoConfiguration to spring.factories
See gh-26134
4 years ago
Andy Wilkinson 0a8da4fd7d Polish "Provide health for an AbstractRoutingDataSource's resolved targets"
See gh-25708
4 years ago
bono007 13600c3367 Provide health for an AbstractRoutingDataSource's resolved targets
See gh-25708
4 years ago
Phillip Webb f03f74ff0a Add Spring Data Repository metrics support
Add support for Spring Data Repository metrics by integrating with
Spring Data's new `RepositoryMethodInvocationListener` support.

Closes gh-22217
4 years ago
izeye 98b0b6c4c5 Fix MongoMetricsAutoConfigurationTests
See gh-25952
4 years ago
Stephane Nicoll d50e581403 Start building against Micrometer 1.7.0-RC1 snapshots
See gh-25934
4 years ago
Brian Clozel b4d2207902 Merge branch '2.4.x'
Closes gh-25936
4 years ago
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
4 years ago
Phillip Webb e4164d0143 Fix package tangle in endpoint package
Fix package tangle in the actuator endpoint package by relocating a
few classes.

The `Producible` and `ProducibleOperationArgumentResolver` classes have
been moved from `endpoint.annotation` to `endpoint` since they aren't
directly tied to annotations.

The `ApiVersion` class has been moved from `endpoint.http` to
`endpoint` since it needs to implement `Producible` and isn't really
tied to HTTP.

Closes gh-25914
4 years ago
Phillip Webb 807ea1af0d Update copyright year of changed files 4 years ago
Andy Wilkinson 73e1dd8728 Polish "Auto-configure Mongo metrics"
See gh-23990
4 years ago
bono007 81c18214d1 Auto-configure Mongo metrics
See gh-23990
4 years ago
Andy Wilkinson ef986b13e5 Polish Quartz endpoint documentation
See gh-10364
4 years ago
Stephane Nicoll b11602aeaa Polish "Add Quartz actuator endpoint"
This commit reworks the initial proposal so that jobs and triggers are
treated as first class concepts.

`/actuator/quartz` now returns the group names for jobs and triggers.

`actuator/quartz/jobs` returns the job names, keyed by the available
group names, while `/actuator/quartz/triggers` does the same for
triggers.

`/actuator/jobs/{groupName}` provides an overview of a job group. It
provides a map of job names with the class name of the job.
implementation

`/actuator/triggers/{groupName}` provides an overview of a trigger
group. There are five supported trigger implementations: cron, simple,
daily time interval, calendar interval, and custom for any other
implementation. Given that each implementation has specific settings,
triggers are split in five objects.

`/actuator/jobs/{groupName}/{jobName}` provides the full details of a
particular job. This includes a sanitized data map and a list of
triggers ordered by next fire time.

`/actuator/triggers/{groupName}/{triggerName}` provides the full details
of a particular trigger. This includes the state, its type, and a
dedicate object containing implementation-specific settings.

See gh-10364
4 years ago
Vedran Pavic 9795061360 Add Quartz actuator endpoint
See gh-10364
4 years ago
Andy Wilkinson 029f1b52b3 Merge branch '2.4.x'
Closes gh-25867
4 years ago
Andy Wilkinson ba28f21e27 Merge branch '2.3.x' into 2.4.x
Closes gh-25866
4 years ago
Andy Wilkinson cbf37b3a8b Use main as the branch name in info endpoint example
Closes gh-25865
4 years ago
Phillip Webb 8c31d29acf Merge branch '2.4.x' 4 years ago
Phillip Webb a28a3ae090 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9c8a97809d Consistent use of @deprecated since
Restore the patch version number for consistency with `@since`
tags.

See gh-25808
4 years ago
Phillip Webb 44b1751bb4 Merge branch '2.4.x'
Closes gh-25826
4 years ago
Phillip Webb 363f5829d1 Merge branch '2.3.x' into 2.4.x
Closes gh-25825
4 years ago
Phillip Webb 26dd1b9a26 Update deprecations with for removal targets
Update all deprecation tags to include a removal target.

Closes gh-25808
4 years ago
Andy Wilkinson 90b4ced7a6 Move DataSource init auto-config out of DataSourceAutoConfiguration
Previously, the auto-configuration for DataSource initialization and
the properties used to configure it were part of the general
DataSource auto-configuration and properties.

This commit moves the auto-configuration of DataSource initialization
out into a separate top-level auto-configuration class. Similarly,
the properties for configuring DataSource initialization have been
moved from `spring.datasource.*` into `spring.sql.init.*`.

The old initialization-related `spring.datasource.*` properties have
been deprecated but can still be used. When they are used, they new,
separate initialization auto-configuration will back off. In other
words, the initialization related `spring.datasource.*` properties
and the `spring.sql.init.*` properties cannot be used in combination.

Closes gh-25323
4 years ago
Phillip Webb 11a94ee6f0 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 82127fdaa3 Update copyright year of changed files 4 years ago
Andy Wilkinson ce3dfc5792 Merge branch '2.4.x'
Closes gh-25767
4 years ago
Andy Wilkinson 33cf8b3bc4 Merge branch '2.3.x' into 2.4.x
Closes gh-25765
4 years ago
Andy Wilkinson bf6f36a783 Apply any root URI to RestTemplate metric's URI tag
Previously, a root URI configured via RestTemplateBuilder's rootUri
method and RootUriTemplateHandler was not taken into account when
generated the URI tag for RestTemplate request metrics.

This commit updates MetricsClientHttpRequestInterceptor to be aware
of RootUriTemplateHandler and capture the URI template once the
root URI has been applied.

Fixes gh-25744
4 years ago
Andy Wilkinson 11b4a19dee Support OpenMetrics text format with Prometheus
Update `PrometheusScrapeEndpoint` so that it can produce both classic
Prometheus text output as well as Openmetrics output.

See gh-25564
4 years ago
Phillip Webb 663fd8ce5e Update copyright year of changed files 4 years ago
Stephane Nicoll 1111b3db98 Polish 4 years ago
Stephane Nicoll 8808d5e4c0 Polish "Support sending metrics to InfluxDB v2"
See gh-25721
4 years ago
Tommy Ludwig 8eb73bcf01 Support sending metrics to InfluxDB v2
See gh-25721
4 years ago
Stephane Nicoll 6f9352bda9 Fix description of management.metrics.export.influx.db
Closes gh-25723
4 years ago
Stephane Nicoll 91c3c7276b Merge branch '2.4.x'
Closes gh-25725
4 years ago
Stephane Nicoll 42994349fe Merge branch '2.3.x' into 2.4.x
Closes gh-25724
4 years ago
Stephane Nicoll 446e838b1b Fix description of management.metrics.export.influx.db
Closes gh-25723
4 years ago
Stephane Nicoll eb406867ea Polish "Upgrade to Micrometer 1.7.0-M1"
See gh-25707
4 years ago
Jonatan Ivanov 7c5e0505d8 Upgrade to Micrometer 1.7.0-M1
See gh-25707
4 years ago
Stephane Nicoll e517ee8635 Merge branch '2.4.x'
Closes gh-25618
4 years ago
izeye 09f4d4b9bf Polish
See gh-25617
4 years ago
Phillip Webb 6e5c510e0a Migrate to asciidoctor-spring-backends
Migrate to the snapshot version of asciidoctor-spring-backends.

See gh-25553
4 years ago
Stephane Nicoll adaf2fc57c Merge branch '2.4.x'
Closes gh-25536
4 years ago
dreis2211 2575621e06 Fix some illegal reflective access warnings
See gh-25531
4 years ago
Stephane Nicoll bb0f43cf07 Allow JMX endpoint ObjectNames to be customized
Closes gh-25317
4 years ago
Stephane Nicoll 36f8a7b9a6 Upgrade copyright year of changed files
See gh-25451
4 years ago
izeye c823f44e76 Polish
See gh-25451
4 years ago
Andy Wilkinson 54ba9e6ddf Merge branch '2.4.x'
Closes gh-25450
4 years ago
Andy Wilkinson cb600f1c0b Merge branch '2.3.x' into 2.4.x
Closes gh-25449
4 years ago
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
4 years ago
Andy Wilkinson f09630f73c Allow additional keys to be configured for value sanitization
Closes gh-25384
4 years ago
Phillip Webb a1dc107144 Update copyright year of changed files 4 years ago
Andy Wilkinson da3f0dc1c7 Merge branch '2.4.x'
Closes gh-25186
4 years ago
Andy Wilkinson 9ba28a8b99 Merge branch '2.3.x' into 2.4.x
Closes gh-25185
4 years ago
Andy Wilkinson bd64e05203 Instrument AMQP AbstractCF when defined as a ConnectionFactory
Fixes gh-25138
4 years ago
Stephane Nicoll b92bb9332b Polish "Filter properties with a particular prefix"
See gh-24718
4 years ago
bono007 ad7c69a9cd Filter properties with a particular prefix
This commit improves the configprops endpoint to allow filtering
properties based on a particular prefix

See gh-24718
4 years ago
Madhura Bhave 301e80be8c Fix raw types error 4 years ago
Madhura Bhave c05cb21ab7 Add a property to disable the `/actuator` discovery page
Closes gh-24693
4 years ago
Stephane Nicoll b2818680fd Polish "Clarify usage of BufferingApplicationStartup"
See gh-25075
4 years ago
Andy Wilkinson db781a0d84 Merge branch '2.4.x'
See gh-25077
4 years ago
Andy Wilkinson 788a42d694 Merge branch '2.3.x' into 2.4.x
See gh-25076
4 years ago
Andy Wilkinson 67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
4 years ago
Phillip Webb c9a2c4e326 Merge branch '2.4.x' 4 years ago
Andy Wilkinson 5a56f8864f Remove error message attribute instead of blanking it when not included
Closes gh-24712
4 years ago
Madhura Bhave d07e351eff Polish " Change info endpoint to be secure and unexposed by default"
See gh-24715
4 years ago
Hatef Palizgar 53c1e79810 Change info endpoint to be secure and unexposed by default
See gh-24715
4 years ago
Phillip Webb a196a9bd8f Merge branch '2.4.x'
Closes gh-24949
4 years ago
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
4 years ago
Stephane Nicoll 012a199773 Remove Spring Data Solr support
In preparation to the upgrade to Spring Data 2021.0, this commit removes
auto-configuration for Spring Data Solr.

Closes gh-24939
4 years ago
Stephane Nicoll 3e376b955d Fix build failure
See gh-24943
4 years ago
Andy Wilkinson b095c7761a Polish "Add config prop for endpoints' CORS allowed origin patterns"
See gh-24680
4 years ago
Pedro Ivo Machado d7f891be39 Add config prop for endpoints' CORS allowed origin patterns
See gh-24680
4 years ago
Andy Wilkinson 4e918b141b Polish 4 years ago
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
4 years ago
Stephane Nicoll 2c2c160579 Remove deprecated code
See gh-24806
4 years ago
Stephane Nicoll a788ef4958 Merge branch '2.4.x'
Closes gh-24842
4 years ago
Stephane Nicoll 2072e7242a Merge branch '2.3.x' into 2.4.x
Closes gh-24841
4 years ago
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
4 years ago
Phillip Webb 4cc1467aba Merge branch '2.4.x' 4 years ago
Phillip Webb a6a7c06e55 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 9da0bd8523 Update copyright year of changed files 4 years ago
Pascal Schumacher aa24f78d85 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
See gh-24734
4 years ago
Stephane Nicoll 632c1239e6 Polish "Add support for GET requests for /actuator/startup"
See gh-24717
4 years ago
bono007 4b8d6efc12 Add support for GET requests for /actuator/startup
See gh-24717
4 years ago
Madhura Bhave b62325a056 Merge branch '2.4.x' 4 years ago
Madhura Bhave 86e94b95c3 Merge branch '2.3.x' into 2.4.x 4 years ago
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
4 years ago
Stephane Nicoll e4618cfb8d Delete ErrorProperties.IncludeStacktrace
Closes gh-21286
4 years ago
Stephane Nicoll 2c0bfb7674 Merge branch '2.3.x' into 2.4.x
Closes gh-24578
4 years ago
izeye 97dd4c0871 Polish
See gh-24558
4 years ago
Madhura Bhave 4822516fb7 Merge branch '2.3.x' into 2.4.x 4 years ago
Madhura Bhave 361198ebba Fix tests
See gh-11987
4 years ago
Madhura Bhave a1ea5b49ec Merge branch '2.3.x' into 2.4.x
Closes gh-24542
4 years ago
Madhura Bhave 09e07428cc Configure CORS in default security configuration for MVC
Fixes gh-11987
4 years ago
Phillip Webb 4fba7d0c60 Merge branch '2.3.x' into 2.4.x 4 years ago
Phillip Webb 29300530c6 Polish 4 years ago
Phillip Webb 72d36e0c07 Update copyright year of changed files 4 years ago
Phillip Webb e95c514661 Merge branch '2.3.x'
Closes gh-24412
4 years ago
Phillip Webb 49e754f48b Merge branch '2.2.x' into 2.3.x
Closes gh-24411
4 years ago
Phillip Webb cd5ff6e4af Merge branch '2.3.x'
Closes gh-24404
4 years ago
Phillip Webb 11f285bde5 Merge branch '2.2.x' into 2.3.x
Closes gh-24403
4 years ago
izeye 8c55803931 Polish
See gh-24306
4 years ago
Phillip Webb 30c27274e2 Merge branch '2.3.x'
Closes gh-24339
4 years ago
Phillip Webb 5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
4 years ago
Phillip Webb 837fc83527 Fix checkstyle header violations
See gh-24337
4 years ago
dreis2211 3e2d0c6d86 Remove deprecated ExposeExcludePropertyEndpointFilter
See gh-24323
4 years ago
Stephane Nicoll bd7e89be1a Start building against Spring Framework 5.3.2 snapshots
See gh-24278
4 years ago
Stephane Nicoll 065fde2996 Start building against Spring Framework 5.2.12 snapshots
See gh-24277
4 years ago
Stephane Nicoll 9763ba56ba Start building against Spring Framework 5.2.12 snapshots
See gh-24276
4 years ago
Andy Wilkinson 1f3012b466 Merge branch '2.3.x'
Closes gh-24220
4 years ago
Andy Wilkinson 0ed7f7f40a Merge branch '2.2.x' into 2.3.x
Closes gh-24219
4 years ago
Andy Wilkinson 08b9d1da57 Polish "Ensure that MeterRegistry bean is defined before SI looks for it"
See gh-24095
4 years ago
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
4 years ago
Andy Wilkinson 699f03d5a6 Merge branch '2.3.x'
Closes gh-24010
4 years ago
Andy Wilkinson 2dce4aa42b Merge branch '2.2.x' into 2.3.x
Closes gh-24009
4 years ago
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
4 years ago
Stephane Nicoll d951f28e16 Upgrade to Micrometer 1.6.0
Closes gh-23525
4 years ago
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
4 years ago
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
4 years ago
Madhura Bhave 0818f27f44 Configure WebSecurity using WebSecurityCustomizer
Replace `WebSecurityConfigurer` and `WebSecurityConfigurerAdapter`
configurations with `WebSecurityCustomizer` or `SecurityFilterChain`
beans.

Closes gh-23421
4 years ago
Andy Wilkinson abfdfc3e5f Merge branch '2.3.x'
Closes gh-23908
4 years ago
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
4 years ago
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
4 years ago
Stephane Nicoll 9efff2af83 Merge branch '2.3.x'
Closes gh-23735
4 years ago
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
4 years ago
Stephane Nicoll b7a8b0f19b Hacking
See gh-23740
4 years ago
Andy Wilkinson 3f1f830efe Fail if management.server.address is set but actuator is on the same port
Closes gh-22187
4 years ago
Andy Wilkinson d005a64c9f Revert "Rename CompositeMeterRegistryAutoConfiguration"
This reverts commit 9460d74e8a.

Fixes gh-23724
4 years ago
Stephane Nicoll 34c4c3f235 Expose cache metrics for Redis
This commit adds support for Redis cache metrics. Users can opt-in for
statistics using the "spring.cache.redis.enable-statistics" property.

Closes gh-22701
4 years ago
Stephane Nicoll 35d41e4ae2 Remove code deprecated in Spring Boot 2.2
Closes gh-22034
4 years ago
dreis2211 ecee9c0f9b Avoid unnecessary explicit initialization of Atomics
Constructor calls like new AtomicInteger(0) cause a volatile write that
can be saved in cases where the constructor parameter is the default
value.

See gh-23575
4 years ago
Stephane Nicoll de32fab324 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
4 years ago
Stephane Nicoll 366fec33d0 Adapt to API change in Spring Framework 5.3.0 snapshots
See gh-23534
4 years ago
Stephane Nicoll 4009acf025 Add support for Hazelcast
This commit upgrades to Hazelcast 4.0.3, yet keeping compatibility with
Hazelcast 3.x.

Closes gh-20856
Closes gh-23475
4 years ago
Andy Wilkinson 6d2deb89dd Polish 4 years ago
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
4 years ago
Phillip Webb c284edde67 Update copyright year of changed files 4 years ago
Andy Wilkinson 9d3c718bf3 Merge branch '2.3.x'
Closes gh-23306
4 years ago
Andy Wilkinson 53f2966b61 Merge branch '2.2.x' into 2.3.x
Closes gh-23305
4 years ago
Andy Wilkinson 5d20660c8a Disable proxyBeanMethods on all management context config classes
Fixes gh-23301
4 years ago
Stephane Nicoll f03ed3b2a7 Publish single page doc to /htmlsingle consistently
Closes gh-21585
4 years ago
Stephane Nicoll b9b7393053 Deprecate Cassandra health indicators that rely on Spring Data
With the introduction of health indicators that only require the
CqlSession, this commit deprecates the health indicators that require
Spring Data since the latter build on top of the former.

Closes gh-23226
4 years ago
Brian Clozel 8d27cac43e Polish
See gh-22358
4 years ago
Brian Clozel 1d73d4eda7 Remove Elasticsearch RestClient auto-configuration
Prior to this commit, Spring Boot would auto-configure both
Elasticsearch variants: `RestClient` ("Low Level" client) and
`RestHighLevelClient` ("High Level" client).
Since one can be derived from the other, this would create complex and
unclear situations depending on what developers provided with their
configuration.

`RestHighLevelClient` is mostly for actual use of the Elasticsearch API,
with support for specific methods and (de)serialization. On the other
hand, `RestClient` is merely wrapping the Apache HTTP client for
load-balancing support and low level HTTP features.

This commit completely removes the support for `RestClient` in Spring
Boot and now requires the presence of the
`org.elasticsearch.client:elasticsearch-rest-high-level-client`
dependency for REST client support with Elasticsearch.

Closes gh-22358
4 years ago
Brian Clozel 1152a39caa Polish 4 years ago
Brian Clozel 8dcb3312f2 Switch startup actuator endpoint to using HTTP POST
Closes gh-23213
4 years ago
Brian Clozel 676e1809fb Add startup Actuator endpoint
This commit builds on top of gh-22603 and exposes data collected by the
`BufferingApplicationStartup` on a dedicated `"/startup"` Actuator
endpoint.

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

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

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

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

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

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

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

Fixes gh-22562
4 years ago
Madhura Bhave 4b2c94cb2b Allow exclude only health groups
Closes gh-22053
4 years ago
Stephane Nicoll c6fde1e4d5 Polish "Update Neo4j health check to use the Neo4j Driver"
See gh-22302
4 years ago
Gerrit Meier c5a7815e42 Update Neo4j health check to use the Neo4j Driver
This commit replaces the Neo4j-OGM based health checks with one based on
the Neo4j Java driver. A Reactive variant is also added in this commit.

See gh-22302
4 years ago
Stephane Nicoll 16aa8fbc88 Fix actuator dependency on Jackson JSR 310 module
This commit harmonizes dependency declarations for Jackson in the
actuator. Both Jackson and JSR 310 are back to optional in the core
actuator module and mandatory when using the auto-configuration.

Closes gh-22624
4 years ago
Andy Wilkinson ce7210c4f0 Merge branch '2.1.x' into 2.2.x
Closes gh-22563
4 years ago
Nelson Osacky 585aed8f8f Add generated-snippets as output to test goal
The generated snippets were not declared as an output to the
`spring-boot-actuator-autoconfigure` test goal so when the test was
pulled from the cache, it did not contain the `generated-snippets`
directory. This directory is required as an input to the Asciidoctor
plugin.

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

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

See gh-21658
4 years ago
Phillip Webb 3d7d9d064c Update copyright year of changed files 4 years ago
Andy Wilkinson 0ac7178ae1 Merge branch '2.3.x'
Closes gh-22491
4 years ago
dreis2211 198131f5e4 Remove redundant compiler arguments in Gradle build files
See gh-22488
4 years ago
Andy Wilkinson 8799033801 Merge branch '2.3.x' 4 years ago
Andy Wilkinson 2063c242ae Polish 4 years ago
Brian Clozel 1d95e2f504 Merge branch '2.3.x'
Closes gh-22483
4 years ago
Brian Clozel fe807d6c0b Improve liveness/readiness health config
Prior to this commit, the application availability infrastructure
would mix the `AvailabilityState`, the `HealthIndicator` and the
`HealthGroup` concepts and would not align with the rest.

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

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

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

Closes gh-22107
4 years ago
Andy Wilkinson b627918011 Polish "Optionally ignore routing data sources when creating DB health indicators"
See gh-22222
4 years ago
Julio Gomez Diaz 13d1d2393d Optionally ignore routing data sources when creating DB health indicators
See gh-22222
4 years ago
Andy Wilkinson b356bc830d Merge branch '2.3.x' 4 years ago
Andy Wilkinson dfea2f432a Polish
See gh-21921
4 years ago
Brian Clozel 3f93978e99 Merge branch '2.3.x'
Closes gh-22215
4 years ago
Brian Clozel 86d8366ee2 Polish support for reactive Elasticsearch healthcheck
Fixes gh-21042
4 years ago
Aleksander Lech 203878a16f Add support for reactive Elasticsearch healthcheck
Prior to this commit, configuring a reactive Elasticsearch client would
auto-configure an Actuator Health check using a synchronous client, with
the default configuration properties (so tarting localhost:9200).

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

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

See gh-21042
4 years ago
Andy Wilkinson d85774ea77 Merge branch '2.3.x'
Closes gh-22196
4 years ago
Eddú Meléndez 54e0a61b42 Reinstate metrics for Kafka Streams
See gh-21921
4 years ago
Andy Wilkinson 77eb5f7794 Polish "Add StatsD transport protocol configuration option"
See gh-22125
4 years ago
Lee Dobryden 5d41f60e45 Add StatsD transport protocol configuration option
See gh-22125
4 years ago
Phillip Webb efe84356b7 Merge branch '2.3.x'
Closes gh-22064
4 years ago
Phillip Webb 03b0a373ab Merge branch '2.2.x' into 2.3.x
Closes gh-22063
4 years ago
Phillip Webb e6eb02603c Polish 'Inherit show-details property in health groups'
Rework the inheritance so that the property metadata JSON more
accurately reflects the default value.

See gh-22022
4 years ago
Leo Li 10de88884f Inherit show-details property in health groups
Update `Group` properties so that the `showDetails` value does not
inherit `Show.NEVER`. Prior to this commit, the `Group` properties
would not correctly inherit a `showDetails` value from the main
`management.endpoint.health.show-details` property.

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

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

Fixes gh-21911
4 years ago
Stephane Nicoll 35e069e2cd Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
4 years ago
Alexandre Dutra dad9ec86d5 Add health indicator for Cassandra that uses the CqlSession
This commit provides a CassandraDriverHealthIndicator and
CassandraDriverReactiveHealthIndicator that do not require Spring Data.
As a result, a health indicator for Cassandra is provided even if the
application does not use Spring Data.

See gh-20887
4 years ago
Scott Frederick 9ae6816785 Merge branch '2.3.x'
Closes gh-21874
5 years ago
Scott Frederick 7a793a11fb Merge branch '2.2.x' into 2.3.x
Fixes gh-21036 in 2.3.1
5 years ago
Scott Frederick 0fa1d0ef2e Handle bind exceptions in management context
This commit updates the logic for handling binding exceptions in the
management context when it is separate from the application context.
The changes allow the exception details to be visible to
DefaultErrorAttributes without causing the servlet container to
detect an error condition.

Fixes gh-21036
5 years ago
Phillip Webb 8a7a5929ae Merge branch '2.3.x' 5 years ago
Phillip Webb cc50605687 Merge branch '2.2.x' into 2.3.x 5 years ago
Phillip Webb 0a05b4c9fd Update copyright year of changed files 5 years ago
Stephane Nicoll da5e8d70a1 Polish "Support filtered scrape for Prometheus"
See gh-21545
5 years ago
Johnny Lim cd1baf18fe Support filtered scrape for Prometheus
See gh-21545
5 years ago
Andy Wilkinson 24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
5 years ago
Andy Wilkinson daeca9f332 Restore Boot 2.2's compile-scoped dependencies
Fixes gh-21507
5 years ago
Madhura Bhave d3f72326d0 Merge branch '2.2.x' into 2.3.x
Closes gh-21642
5 years ago
Madhura Bhave 573cb98d90 Make management security configuration back off when SAML present
Fixes gh-21620
5 years ago
Stephane Nicoll 069c31a074 Map connection and read timeouts for New Relic again
Closes gh-21440
5 years ago
Phillip Webb fd505e516f Merge branch '2.2.x'
Closes gh-21444
5 years ago
Phillip Webb 49a21ded7a Create endpoint beans as late as possible
Update `EndpointDiscoverer` so that `@Endpoint` and `@EndpointExtension`
beans are created as late as possible.

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

Fixes gh-20714
5 years ago