Commit Graph

1029 Commits

Author SHA1 Message Date
Stephane Nicoll
90e3d88793 Fix link to Spring Integration Graph documentation
Closes gh-20023
2020-02-03 17:30:37 +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
Andy Wilkinson
443d1a6a21 Upgrade to Liquibase 3.8.5
Closes gh-19754
2020-01-15 15:09:58 +00:00
Phillip Webb
15652ae4c1 Update copyright year of changed files 2020-01-13 16:47:17 -08:00
Phillip Webb
3cfbfebbb1 Merge branch '2.1.x' into 2.2.x 2020-01-13 16:45:40 -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
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
dreis2211
b6e4c0f012 Add group property to DynatraceProperties
See gh-19369
2019-12-15 08:54:42 +09: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
Brian Clozel
eeaa9bc6c1 Fix ref docs code snippet theme
This commit also fixes a link in the reference documentation.

See gh-18293
2019-09-24 11:25:57 +02:00
Stephane Nicoll
3c8402f6af Polish
See gh-18194
2019-09-24 09:35:39 +02:00
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
2019-09-23 23:43:43 -07:00
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
2019-09-20 21:38:56 -07:00
Brian Clozel
73ed96893f
Polish spring-doc-resources update
See gh-18293
2019-09-20 23:10:17 +02:00
Andy Wilkinson
d5fc324537 Upgrade to Asciidoctor Maven Plugin 1.6.0
Closes gh-17234
2019-09-20 11:59:16 +01:00
Johnny Lim
5b41c3b608 Polish
See gh-18192
2019-09-12 14:55:47 +02:00
Stephane Nicoll
a56eb4b974 Fix typo 2019-09-09 14:23:24 +02:00
Stephane Nicoll
ae34ae78dc Polish "Remove management.health.status.order from docs"
See gh-18170
2019-09-09 14:13:46 +02:00
dreis2211
7a49651e09 Remove management.health.status.order from docs
See gh-18170
2019-09-09 14:13:04 +02:00
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.
2019-09-09 13:37:54 +02:00
Andy Wilkinson
0c0e2dd54b Merge branch '2.1.x'
Closes gh-18186
2019-09-09 11:16:30 +01:00
Andy Wilkinson
674d3dd262 Polish health endpoint documentation for groups and nesting
Closes gh-14022
2019-09-09 11:02:39 +01:00
Andy Wilkinson
7b1e10ed00 Use one sentence per line in Actuator and Gradle plugin doc source
Closes gh-18185
2019-09-09 10:59:49 +01:00
freekry
e1611287c8 Simplify some code
See gh-18077
2019-09-01 09:05:53 +02:00
Phillip Webb
cbcfd9de6f Merge branch '2.1.x' 2019-08-30 16:28:03 -07:00
Phillip Webb
db26d9dc91 Fix EndpointRequest ignore logic
Fixup ignore logic in `EndpointRequest`.

See gh-18012
2019-08-30 16:25:07 -07:00
Phillip Webb
1283bc05d7 Merge branch '2.1.x'
Closes gh-18021
2019-08-30 14:41:36 -07:00
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
2019-08-30 14:36:16 -07:00
Madhura Bhave
2726540e76 Merge branch '2.1.x'
Closes gh-17980
2019-08-28 13:13:48 +05:30
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>
2019-08-28 11:48:53 +05:30
Phillip Webb
fb846f434f Merge branch '2.1.x'
Fixes gh-17959
2019-08-25 21:37:07 -07:00
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
2019-08-25 21:34:25 -07:00
Stephane Nicoll
52bcdac7b0 Polish 2019-08-23 13:44:24 +02:00
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
2019-08-22 14:50:10 +01:00
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>
2019-08-21 18:43:25 -07:00
Phillip Webb
f09e0264d9 Migrate HealthIndicator auto-configurations
Migrate all `HealthIndicator` configuration to `HealthContributor`
configurations instead.

See gh-14022
2019-08-21 18:43:25 -07:00
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
2019-08-21 18:43:25 -07:00
Madhura Bhave
55c6ee71c1 Include logger group with configuredLevel in docs
Closes gh-17772
2019-08-20 22:48:26 -07:00
Andy Wilkinson
f916e1a1ce Document response structure for retrieving a logger group
Closes gh-17909
2019-08-19 14:18:41 +01:00
lijuny
200de49c11 Replace Collection#addAll to call constructor
See gh-17847
2019-08-14 08:42:13 +02:00
Stephane Nicoll
2784fc1506 Merge branch '2.1.x'
Closes gh-17764
2019-08-02 13:57:22 +02:00
Stephane Nicoll
308a5e9360 Fix bean name for reactive Cassandra health indicator
Closes gh-17763
2019-08-02 13:56:16 +02:00
Phillip Webb
da4f436140 Change SearchStrategy EXHAUSTIVE to TYPE_HIERARCHY
Fixup references following upstream Spring Framework change.
2019-07-31 15:11:43 +01:00
Madhura Bhave
b444c3c545 Fix asciidoc section ids 2019-07-30 16:28:59 -07:00
Madhura Bhave
61b86ff231 Polish "Add support for configuring logging groups"
See gh-17515

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

See gh-17699
2019-07-30 17:39:47 +02:00
dreis2211
8d2f2b75bd Upgrade to AssertJ 3.13.1
See gh-17690
2019-07-30 09:48:33 +02:00
Phillip Webb
3b28b1cade Don't use static final security matcher
Using static final matchers breaks the build because they have state
that's not reset across tests.

See gh-17525
2019-07-29 12:13:31 +01:00
Phillip Webb
6675f49334 Switch to multi-line security configuration
Now that we have lambda style security configuration we can further
improve readability by switching to one statement per line.

See gh-17525
2019-07-29 11:28:51 +01:00
Madhura Bhave
39a7b9da38 Switch to lambda style security configuration
Closes gh-17525
2019-07-26 14:41:49 -07:00
Phillip Webb
8bc780762a Merge branch '2.1.x' 2019-07-24 11:42:48 +01:00
Phillip Webb
fb1dd8fe93 Merge branch '2.0.x' into 2.1.x 2019-07-24 11:41:32 +01:00
Phillip Webb
913e831f4e Merge '1.5.x' into 2.0.x 2019-07-24 11:39:58 +01:00
Stephane Nicoll
94c35ae1de Polish "Make Actuator dedicated ConversionService configurable"
See gh-16449
2019-07-23 12:27:00 +02:00
chao.chang
2aea437536 Make Actuator dedicated ConversionService configurable
See gh-16449
2019-07-23 11:16:27 +02:00
Andy Wilkinson
741d8735d2 Merge branch '2.1.x'
Closes gh-17576
2019-07-18 17:57:07 +01:00
dreis2211
43833c7bf0 Remove unused java-statsd-client dependencies
See gh-17508
2019-07-18 17:54:48 +01:00
Stephane Nicoll
be988d7072 Polish "Add HealthIndicator for Hazelcast"
See gh-17499
2019-07-18 15:00:53 +02:00
Dmytro Nosan
fca5a2b824 Add HealthIndicator for Hazelcast
See gh-17499
2019-07-18 14:58:18 +02:00
Andy Wilkinson
3bf5cf1124 Merge branch '2.1.x'
Closes gh-17562
2019-07-18 07:22:24 +01:00
Andy Wilkinson
b725c60177 Deprecate DeploymentInfo customization with reactive Undertow
Fixes gh-17555
2019-07-18 06:54:38 +01:00
Phillip Webb
d567261790 Polish 2019-07-17 21:38:44 +01:00