Commit Graph

1045 Commits (b9cb1c810b2d694779f75ab77a6f0c590bb35d3d)

Author SHA1 Message Date
Scott Frederick 1f1b06dfe2 Remove deprecated Actuator metrics 2.2 code
See gh-19699
5 years ago
Scott Frederick 7031a3b17d Remove deprecated logging properties
See gh-19699
5 years ago
Andy Wilkinson 443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
5 years ago
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
5 years ago
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
5 years ago
Phillip Webb 1e5ba09a3e Merge branch '2.2.x' 5 years ago
Phillip Webb 15652ae4c1 Update copyright year of changed files 5 years ago
Phillip Webb f57281340c Merge branch '2.2.x' 5 years ago
Phillip Webb 3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 5 years ago
Madhura Bhave d1f51e064b Merge branch '2.2.x'
Closes gh-19701
5 years ago
Madhura Bhave e60194c7d5 Ignore trailing slash when recording Web metrics
Fixes gh-18207
5 years ago
Phillip Webb 9bd49562fe Update copyright year of changed files 5 years ago
Scott Frederick c789592e26 Remove support for deprecated Elasticsearch Jest client
Closes #19676
5 years ago
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
5 years ago
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
5 years ago
Stephane Nicoll ca1710ee56 Upgrade to Apache Cassandra 4.3.1
See gh-19588
5 years ago
Andy Wilkinson ce99db1902 Port the build to Gradle
Closes gh-19609
Closes gh-19608
5 years ago
Stephane Nicoll 462442e7d2 Polish "Add Stackdriver metrics export support"
See gh-19528
5 years ago
Johannes Graf d42256d856 Add Stackdriver metrics export support
See gh-19528
5 years ago
Andy Wilkinson cbacb6116b Merge branch '2.2.x'
Closes gh-19568
5 years ago
Andy Wilkinson e04055650c Merge branch '2.1.x' into 2.2.x
Closes gh-19567
5 years ago
Andy Wilkinson 3fb1bb74ba Configure WebTestClient to be able to consume large responses
Closes gh-19566
5 years ago
Stephane Nicoll 6fc52b0563 Polish 5 years ago
Stephane Nicoll 2c1e81adf0 Polish 5 years ago
Stephane Nicoll bb3b6dbd7d Merge branch '2.2.x'
Closes gh-19375
5 years ago
dreis2211 b6e4c0f012 Add group property to DynatraceProperties
See gh-19369
5 years ago
Madhura Bhave 8dcf1e4033 Provide end-to-end traceability for config properties
Closes gh-14880

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
5 years ago
dreis2211 aea37b5d81 Fix deprecation info in CompositeHealthIndicatorConfiguration
See gh-19180
5 years ago
Johnny Lim f234d9c0ec Remove ConditionEvaluationReportLoggingListener usage if possible
See gh-19159
5 years ago
thelproad 65ab82b3cd Remove redundant code
See gh-19000
5 years ago
Madhura Bhave 6e22ddc1a6 Merge branch '2.1.x' into 2.2.x 5 years ago
Madhura Bhave ff22bd4827 Merge branch '2.1.x' into 2.2.x
Closes gh-19059
5 years ago
Johnny Lim ddb22f5a52 Polish test methods
See gh-18962
5 years ago
wycm 363399ce4a Add missing reference to HazelcastHealthContributorAutoConfiguration
See gh-18847
5 years ago
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
5 years ago
Phillip Webb b3e9a06476 Polish 5 years ago
Stephane Nicoll a83852b7cc Consistently clean actuator endpoint ids
Closes gh-18649
5 years ago
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
5 years ago
dreis2211 9ece2e277f Remove redundant explicit types
See gh-18754
5 years ago
Phillip Webb 597baf9774 Polish "Optimize logger calls"
See gh-18710
5 years ago
wycm 240b1f9e29 Optimize logger calls
Guard logger calls to ensure that they are only made when the
level is set.

See gh-18710
5 years ago
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
5 years ago
dreis2211 8ecdf919f8 Fix Mockito deprecations
See gh-18689
5 years ago
Andy Wilkinson cf62dc862b Polish "Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration"
See gh-18571
5 years ago
dreis2211 35dc4817dd Correct Mono import in LegacyHealthEndpointCompatibilityConfiguration
See gh-18571
5 years ago
Johnny Lim d60d59434d Polish
See gh-18531
5 years ago
Phillip Webb 946202bd42 Polish 'Support 'New Relic' eventType properties'
See gh-18472
5 years ago
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
5 years ago
Andy Wilkinson dab69cfbd2 Upgrade to Promethus Pushgateway 0.7.0
Closes gh-18418
5 years ago
Andy Wilkinson 46c30d6bb0 Merge branch '2.1.x'
Closes gh-18476
5 years ago
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
5 years ago
Phillip Webb a8139ba819 Merge branch '2.1.x' 5 years ago
Phillip Webb 40acbfc733 Update copyright header of changed files 5 years ago
Phillip Webb 262eb686d0 Merge branch '2.1.x'
Closes gh-18468
5 years ago
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>
5 years ago
Stephane Nicoll a36d2cd159 Upgrade to micrometer 1.3.0
Closes gh-18389
5 years ago
Stephane Nicoll d2273bd68e Remove endpoint ID hints from metadata
Closes gh-18381
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
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
5 years ago
Brian Clozel eeaa9bc6c1 Fix ref docs code snippet theme
This commit also fixes a link in the reference documentation.

See gh-18293
5 years ago
Stephane Nicoll 3c8402f6af Polish
See gh-18194
5 years ago
Phillip Webb d7a472b8a6 Restore HealthIndicatorRegistry beans
Restore `HealthIndicatorRegistry` and `ReactiveHealthIndicatorRegistry`
auto-configured beans with a version that adapts to the new contributor
interfaces.

Closes gh-16903
5 years ago
Phillip Webb 838e7eb605 Extract spring-doc-resources URL property
Update the build to use a shared spring-doc-resources URL
rather than repeating it multiple times.

See gh-18293
5 years ago
Brian Clozel 73ed96893f
Polish spring-doc-resources update
See gh-18293
5 years ago
Andy Wilkinson d5fc324537 Upgrade to Asciidoctor Maven Plugin 1.6.0
Closes gh-17234
5 years ago
Johnny Lim 5b41c3b608 Polish
See gh-18192
5 years ago
Stephane Nicoll a56eb4b974 Fix typo 5 years ago
Stephane Nicoll ae34ae78dc Polish "Remove management.health.status.order from docs"
See gh-18170
5 years ago
dreis2211 7a49651e09 Remove management.health.status.order from docs
See gh-18170
5 years ago
Stephane Nicoll 14a676052f Polish
This commit moves `@ConfigurationProperties` to the `@Bean` factory
method as this is unusual to put it at class level if it's exposed
that way.

As HealthIndicatorProperties has a constructor, this makes sure that
the annotation processor enables JavaBean binding mode.
5 years ago
Andy Wilkinson 0c0e2dd54b Merge branch '2.1.x'
Closes gh-18186
5 years ago
Andy Wilkinson 674d3dd262 Polish health endpoint documentation for groups and nesting
Closes gh-14022
5 years ago
Andy Wilkinson 7b1e10ed00 Use one sentence per line in Actuator and Gradle plugin doc source
Closes gh-18185
5 years ago
freekry e1611287c8 Simplify some code
See gh-18077
5 years ago
Phillip Webb cbcfd9de6f Merge branch '2.1.x' 5 years ago
Phillip Webb db26d9dc91 Fix EndpointRequest ignore logic
Fixup ignore logic in `EndpointRequest`.

See gh-18012
5 years ago
Phillip Webb 1283bc05d7 Merge branch '2.1.x'
Closes gh-18021
5 years ago
Phillip Webb 5938ca78b6 Fix request matcher management context support
Fix caching issues in `ApplicationContextRequestMatcher` and allow
subclasses to ignore an application context entirely. Update existing
matcher implementations so that they deal with the management context
correctly.

Prior to this commit, the `ApplicationContextRequestMatcher` would
return a context cached from the first request. It also didn't
provide any way to ignore a context. This meant that if the user was
running the management server on a different port the matching results
could be inconsistent depending on if the first request arrived on
the regular context or the management context. It also meant that we
could not distinguish between the regular context and the management
context when matching.

Closes gh-18012
5 years ago
Madhura Bhave 2726540e76 Merge branch '2.1.x'
Closes gh-17980
5 years ago
Madhura Bhave 674f2f5a6c EndpointRequest should match @ServletEndpoint
This commit also changes the request matcher for MVC
endpoints to use an AntPathRequestMatcher instead of an
MvcRequestMatcher. The endpoint is always available
under the mapped endpoint path and this way the same matcher
can be used for both MVC and Jersey.

Fixes gh-17912

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
Phillip Webb fb846f434f Merge branch '2.1.x'
Fixes gh-17959
5 years ago
Phillip Webb 4c446c38a6 Only add management error page for Spring MVC
Move management `ErrorPage` registration from the
`WebMvcEndpointChildContextConfiguration` to
`WebMvcEndpointChildContextConfiguration` and only add it when the
error controller is registered.

Fixes gh-17938
5 years ago
Stephane Nicoll 52bcdac7b0 Polish 5 years ago
Andy Wilkinson b43827d626 Configure ping (formerly application) health indicator by default
This commit renames ApplicationHealthIndicator to PingHealthIndicator
and changes the auto-configuration so that it is now always configured
by default.

Closes gh-17926
5 years ago
Phillip Webb e03f822c6d Add support for health indicator groups
Update the `HealthEndpoint` to support health groups. The
`HealthEndpointSettings` interface has been replaced with
`HealthEndpointGroups` which provides access to the primary group
as well as an optional set of additional groups.

Groups can be configured via properties and may have custom
`StatusAggregator` and `HttpCodeStatusMapper` settings.

Closes gh-14022

Co-authored-by: Stephane Nicoll <snicoll@pivotal.io>
5 years ago
Phillip Webb f09e0264d9 Migrate HealthIndicator auto-configurations
Migrate all `HealthIndicator` configuration to `HealthContributor`
configurations instead.

See gh-14022
5 years ago
Phillip Webb 3c535e0de3 Add HealthContributor and refactor HealthEndpoint
Overhaul `HealthEndpoint` support to make it easier to support health
groups. Prior to this commit the `HealthIndicator` interface was used
for both regular indicators and composite indicators. In addition the
`Health` result was used to both represent individual, system and
composite health. This design unfortunately means that all health
contributors need to be aware of the `HealthAggregator` and could not
easily support heath groups if per-group aggregation is required.

This commit reworks many aspects of the health support in order to
provide a cleaner separation between a `HealthIndicator`and a
composite. The following changes have been made:

- A `HealthContributor` interface has been introduced to represent
  the general concept of something that contributes health information.
  A contributor can either be a `HealthIndicator` or a
  `CompositeHealthContributor`.

- A `HealthComponent` class has been introduced to mirror the
  contributor arrangement. The component can be either
  `CompositeHealth` or `Health`.

- The `HealthAggregator` interface has been replaced with a more
  focused `StatusAggregator` interface which only deals with `Status`
  results.

- `CompositeHealthIndicator` has been replaced with
  `CompositeHealthContributor` which only provides access to other
  contributors. A composite can no longer directly return `Health`.

- `HealthIndicatorRegistry` has been replaced with
  `HealthContributorRegistry` and the default implementation now
  uses a copy-on-write strategy.

- `HealthEndpoint`, `HealthEndpointWebExtension` and
  `ReactiveHealthEndpointWebExtension` now extend a common
  `HealthEndpointSupport` class. They are now driven by a
  health contributor registry and `HealthEndpointSettings`.

- The `HealthStatusHttpMapper` class has been replaced by a
  `HttpCodeStatusMapper` interface.

- The `HealthWebEndpointResponseMapper` class has been replaced
  by a `HealthEndpointSettings` strategy. This allows us to move
  role related logic and `ShowDetails` to the auto-configure module.

- `SimpleHttpCodeStatusMapper` and `SimpleStatusAggregator`
  implementations have been added which are configured via constructor
  arguments rather than setters.

- Endpoint auto-configuration has been reworked and the
  `CompositeHealthIndicatorConfiguration` class has been replaced
  by `CompositeHealthContributorConfiguration`.

- The endpoint JSON has been changed make `details` distinct from
  `components`.

See gh-17926
5 years ago
Madhura Bhave 55c6ee71c1 Include logger group with configuredLevel in docs
Closes gh-17772
5 years ago
Andy Wilkinson f916e1a1ce Document response structure for retrieving a logger group
Closes gh-17909
5 years ago
lijuny 200de49c11 Replace Collection#addAll to call constructor
See gh-17847
5 years ago
Stephane Nicoll 2784fc1506 Merge branch '2.1.x'
Closes gh-17764
5 years ago
Stephane Nicoll 308a5e9360 Fix bean name for reactive Cassandra health indicator
Closes gh-17763
5 years ago
Phillip Webb da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
5 years ago
Madhura Bhave b444c3c545 Fix asciidoc section ids 5 years ago
Madhura Bhave 61b86ff231 Polish "Add support for configuring logging groups"
See gh-17515

Co-authored-by: Phillip Webb <pwebb@pivotal.io>
5 years ago
HaiTao Zhang b9047c22e0 Add support for configuring logging groups via endpoint
See gh-17515
5 years ago
Stephane Nicoll b405f8ecf2 Introduce PushRegistry abstraction
This commit introduces a separate layer between PushRegistry and
StepRegistry-based implementations.

See gh-17699
5 years ago