Commit Graph

428 Commits (997a27c57dc7babcf485e696f0aa00d4b2ad2d64)

Author SHA1 Message Date
Johnny Lim 0f0c6e0729 Polish
Closes gh-11536
7 years ago
Phillip Webb cae02ce0b8 Make WebMvcMetricsFilter lazy
Update `WebMvcMetricsFilter` so that it no longer causes early
initialization of Spring MVC concerns.

Fixes gh-11571
7 years ago
Phillip Webb 25609c060e Polish 7 years ago
Stephane Nicoll ac004eabf3 Update copyright header
See gh-11510
7 years ago
Johnny Lim 37d8eedae3 Polish
Closes gh-11510
7 years ago
Phillip Webb bee5fa7fc6 Polish 7 years ago
Phillip Webb 6bac365a72 Polish micrometer cache metrics
Change `CacheMeterBinderProvider` to include a cache type
generic which helps to simplify implementations. Also move
and extract a few classes.

See gh-11221
7 years ago
Stephane Nicoll 0515ca0dd0 Auto configure micrometer cache metrics
Closes gh-11221
7 years ago
Johnny Lim 24b5a78e39 Polish
Closes gh-11448
7 years ago
Madhura Bhave 8102dc78cb Remove redundant throws declarations 7 years ago
Johnny Lim 8ae2be6043 Fix property names in MeterBindersConfiguration
Closes gh-11443
7 years ago
Madhura Bhave c29fe05708 Remove redundant property from tests 7 years ago
Stephane Nicoll 8d1bd7eb3c Polish 7 years ago
Stephane Nicoll 81af02fde7 Improve JVM metrics
This commit adds GC and thread jvm metrics to the existing memory
metrics. All three are now managed by a unique
management.metrics.binders.jvm.enabled property.

Closes gh-11425
7 years ago
Stephane Nicoll f0d94a46fd Polish 7 years ago
Stephane Nicoll afba8fed79 Harmonize management.server.context-path property
This commit moves management.server.context-path to
management.server.servlet.context-path to align with the configuration
key for the application's main context path.

Closes gh-11359
7 years ago
Stephane Nicoll 2738147947 Polish "Move CorsEndpointProperties to the parent package"
Closes gh-11439
7 years ago
Johnny Lim 8383b76138 Move CorsEndpointProperties to the parent package
`CorsEndpointProperties` lives in `endpoint.web.servlet` but is also used
in `endpoint.web.reactive`, so this PR moves it to its common parent
package.

This commit also extracts `CorsConfiguration` creation logic duplicated
in `WebMvcEndpointManagementContextConfiguration` and
`WebFluxEndpointManagementContextConfiguration` into
`CorsEndpointProperties`.

See gh-11439
7 years ago
Johnny Lim 3c5ccb1166 Polish
Closes gh-11418
7 years ago
Johnny Lim b35348b41d Remove org.flywaydb.core.internal.util.StringUtils import
Closes  gh-11396
7 years ago
Johnny Lim 3a276d2a87 Rename CloudFoundryHealthWebEndpointManagementContextConfiguration
Closes gh-11400
7 years ago
Johnny Lim 240aaadd83 Fix package name for InfluxDB
Closes gh-11364
7 years ago
Eddú Meléndez cc9b2a9786 Fix property key to enable influxdb health endpoint
Closes gh-11365
7 years ago
Phillip Webb 6cb331ed2c Cache endpoint enabled-by-default result
Update `OnEnabledEndpointCondition` so that the result of
`management.endpoints.enabled-by-default` is cached between calls.

Fixes gh-11407
7 years ago
Phillip Webb befdbaaaa9 Polish 7 years ago
Stephane Nicoll 2ed162a0be Fix outdated references to server.context-path
Closes gh-11358
7 years ago
Stephane Nicoll a33c3eec3f Polish "Add InfluxDb health indicator"
Closes gh-11159
7 years ago
Eddú Meléndez cdbdc1cb7f Add InfluxDb health indicator
See gh-11159
7 years ago
Stephane Nicoll ef78cb33b3 Move metrics properties to "management.metrics"
Closes gh-11340
7 years ago
Stephane Nicoll de8fe7550f Polish 7 years ago
Stephane Nicoll 41720ca93d Improve extension of Neo4jHealthIndicator
This commit makes it easier to extend `Neo4jHealthIndicator` for cases
where a custom cypher needs to be executed.

Closes gh-11120
7 years ago
Phillip Webb 3273859fde Polish 7 years ago
Stephane Nicoll 681fdb1ee8 Property detect Health web extension with management context
Previously, the Health web extension was defined in the management
context and, as a result, it wasn't found when a separate port was
required. The side effect is that anything that the health web extension
does was not active anymore in that case.

This commit makes sure that the extension is always defined as part of
the main context where operations are discovered and merged.

Closes gh-11285
7 years ago
Johnny Lim de72f2ae32 Polish
Closes gh-11327
7 years ago
Brian Clozel 175f451b0f Polish 7 years ago
Alessandro Ciccimarra e1def637ae Apply configurers on MeterRegistry before injection
MeterRegistryConfigurers are now applied within the Bean method
creating the CompositeMeterRegistry, instead of applying them
later in its lifecycle, when the bean itself could have been
injected somewhere.

Fixes gh-11319
7 years ago
Stephane Nicoll 23218add90 Polish 7 years ago
Brian Clozel 5f3c2bef50 Add CORS support to Actuator WebFlux
Closes gh-11308
7 years ago
Stephane Nicoll 5ef9364085 Polish 7 years ago
Johnny Lim 384819ab5f Add @Configuration to ScheduledTasksEndpointAutoConfiguration
Closes gh-11313
7 years ago
Johnny Lim 6d54072e04 Remove "final" keywords
Closes gh-11294
7 years ago
Andy Wilkinson c0e3ae9042 Polish 7 years ago
Johnny Lim d33c6773da Use volatile for ReactiveTokenValidator.cacheTokenKeys
Closes gh-11233
7 years ago
Johnny Lim ada4d13a4e Document spring.metrics.binders.*
Closes gh-11262
7 years ago
Stephane Nicoll a4913712cb Do not expose the composite ReactiveHealthIndicator as a bean
Previously, a `ReactiveHealthIndicator` bean was exposed to define the
health indicator to use for the reactive endpoint. Having it exposed as
a bean has the side effect that the regular `HealthIndicator` composite
is picked up and a "reactive" entry is added to the health details.

This commit creates such indicator internally as it should be.

Closes gh-11222
7 years ago
Stephane Nicoll 5dc28ec446 Merge branch '1.5.x' 7 years ago
Johnny Lim 44299bb980 Polish
Closes gh-11206
7 years ago
Johnny Lim 952224ef56 Polish
Closes gh-11193
7 years ago
Phillip Webb 2c959b8e2a Polish health indicators
Align reactive and non-reactive web extensions and update `showDetails`
so that it only applies to web exposure.

See gh-11113
See gh-11192
7 years ago
Madhura Bhave 9e95483645 Add cloudfoundry health extensions
Fixes gh-11192
7 years ago
Phillip Webb e1306c6228 Polish micrometer rc.5 upgrade
Closes gh-11071
7 years ago
Jon Schneider 2e0a915281 Upgrade to micrometer 1.0.0-rc.5
See gh-11071
7 years ago
Phillip Webb 960083bd33 Polish 7 years ago
Madhura Bhave 2319d01feb Prevent race condition in ReactiveTokenValidator 7 years ago
Andy Wilkinson 22a426fe39 Polish 7 years ago
Madhura Bhave 9f76832488 Optimize fetching tokenKeys for reactive actuators
Closes gh-10899
7 years ago
Johnny Lim 70d92037bd Use BeanIds.SPRING_SECURITY_FILTER_CHAIN
See gh-11162
7 years ago
Stephane Nicoll 480039f212 Fix default value of management.endpoints.web.expose 7 years ago
Stephane Nicoll a12bab453c Polish "Fix PropertiesConfigAdapter delegation logic"
Closes gh-11135
7 years ago
Nikolay Rybak 9163d65b0e Fix PropertiesConfigAdapter delegation logic
This change replaces fallback logic in PropertiesConfigAdapter and its
descendants such that instead of falling back to default "empty" config
it delegates to superinterface default implementation of the same class.

This allows default implementation to call back to other properties,
like DatadogConfig.uri() does.

See gh-11135
7 years ago
Stephane Nicoll 45e8c237de Polish 7 years ago
Johnny Lim 01a48412d2 Polish
Closes gh-11126
7 years ago
Stephane Nicoll 97bb70cd0c Polish 7 years ago
Stephane Nicoll 3a6a238ea9 Improve error metadata for Actuator 7 years ago
Vedran Pavic 63aef58d30 Fix references to management related properties
See gh-11091
7 years ago
Phillip Webb 07f71e889e Move `/application` to `/actuator`
Change the endpoint default path from `/application` to `/actuator`.

Fixes gh-10970
7 years ago
Phillip Webb 3e2ede51d6 Delete `status` documentation
See gh-11113
7 years ago
Phillip Webb 31025d9f6c Drop status endpoint
Drop the status endpoint and merge functionality back into the health
endpoint. The `management.endpoint.health.show-details` property can
be used to change if full details, or just the status is displayed.

Fixes gh-11113
7 years ago
Phillip Webb e82913dd5a Align appendix edits with source code
Port editing changes from append to java source files to ensure that
IDE meta-data also reflects the improvements.

Closes gh-10870
7 years ago
Phillip Webb 64c5e8b6ed Rename @DurationUnit -> @DefaultDurationUnit
Rename `@DurationUnit` to `@DefaultDurationUnit` to make it clearer
that it only changes the unit if one isn't specified by the user.

Closes gh-11078
7 years ago
Andy Wilkinson bc98b84013 Reduce excessive logging by disabling Statsd metrics export
Closes gh-11009
7 years ago
Phillip Webb 8f4bf233b4 Update configuration properties to use Duration
Update appropriate configuration properties to use the `Duration`
type, rather than an ad-hoc mix of milliseconds or seconds.

Configuration properties can now be defined in a consistent and readable
way. For example `server.session.timeout=5m`.

Properties that were previously declared using seconds are annotated
with `@DurationUnit` to ensure a smooth upgrade experience. For example
`server.session.timeout=20` continues to mean 20 seconds.

Fixes gh-11080
7 years ago
Johnny Lim 73c65286ea Polish 7 years ago
Phillip Webb 7ff2cb5dc8 Polish 7 years ago
Madhura Bhave 49768e2b1f Register config classes once in reactive child context
Fixes gh-10939
7 years ago
Phillip Webb a6cefc5ba0 Polish 7 years ago
Madhura Bhave 5ce9067e30 Clean trailing slash from endpoints.web.base-path
Fixes gh-11021
7 years ago
Andy Wilkinson 3e46b5c5c7 Auto-configure endpoints in main context so they are always discovered
Closes gh-11046
7 years ago
Andy Wilkinson 3b45342359 Make Actuator Web API documentation compatible with Java 9
Closes gh-8042
7 years ago
Jay Bryant 706600c003 Polish Actuator Web API documentation
See gh-8042
7 years ago
Andy Wilkinson 4de208bc94 Provide reference documentation for Actuator web endpoints
Closes gh-8042
7 years ago
Johnny Lim e8563c54dd Polish
Closes gh-11050
7 years ago
Stephane Nicoll 54b54b7c30 Fix condition for Datadog's api key
Closes gh-11053
7 years ago
Johnny Lim cbb483735d Polish
Closes gh-10948
7 years ago
Stephane Nicoll bcab23e538 Polish "Separate endpoint concerns"
* Fix the endpoint prefix for generated metadata.
* Polish and improve configuration key descriptions.

Closes gh-10176
7 years ago
Phillip Webb fd5c43cdc9 Separate endpoint concerns
Update endpoint code to provide cleaner separation of concerns.
Specifically, the top level endpoint package is no longer aware of
the fact that JMX and HTTP are ultimately used to expose endpoints.
Caching concerns have also been abstracted behind a general purpose
`OperationMethodInvokerAdvisor` interface.

Configuration properties have been refined to further enforce
separation. The `management.endpoint.<name>` prefix provides
configuration for a  single endpoint (including enable and cache
time-to-live). These  properties are now technology agnostic (they
don't include `web` or `jmx` sub properties).

The `management.endpoints.<technology>` prefix provide exposure specific
configuration. For example, `management.endpoints.web.path-mapping`
allow endpoint URLs to be changed.

Endpoint enabled/disabled logic has been simplified so that endpoints
can't be disabled per exposure technology. Instead a filter based
approach is used to allow refinement of what endpoints are exposed over
a given technology.

Fixes gh-10176
7 years ago
Phillip Webb f647f5689f Polish 7 years ago
Andy Wilkinson 1a094598b8 Add an endpoint for retrieving information about scheduled tasks
Closes gh-8831
7 years ago
Stephane Nicoll 1830dcf103 Rename AutoConfigurationReportEndpoint to ConditionsEndpoint
This commit further aligns the change to ConditionEvaluationReport by
renaming the 'autoconfig' endpoint to 'conditions'.

Closes gh-2945
7 years ago
Stephane Nicoll 401fe7e1e2 Polish micrometer configuration key descriptions
Closes gh-10890
7 years ago
Stephane Nicoll 92c62b6e9f Remove resuscitated properties from the deprecation list
This commit removes two properties that were remove in earlier
milestones of Spring Boot 2 and reintroduced with the support of
micrometer.

Closes gh-11015
7 years ago
Andy Wilkinson 806cf32549 Drop redundant web extension for sessions endpoint
Changes made in f1cfad67 mean that the web-specific extension is no
longer required as the infrastructure now automatically produces a
bad request (400) response when a required query parameter is absent.

See gh-10372
7 years ago
Andy Wilkinson 07462be090 Polish 7 years ago
Johnny Lim bd0dcfb172 Utilize StandardCharsets
Closes gh-10972
7 years ago
Madhura Bhave 3be521e825 Add DefaultHandlerExceptionResolver to child context
Fixes gh-10560
7 years ago
Andy Wilkinson 60afbdc868 Polish 7 years ago
Johnny Lim c05a299520 Polish
Closes gh-10921
7 years ago
Phillip Webb cf17e5708b Polish Micrometer 1.0.0-rc.3 upgrade
Polish Micrometer 1.0.0-rc.3 upgrade changes.

Closes gh-10906
7 years ago
Jon Schneider 65e6876025 Upgrade to Micrometer 1.0.0-rc.3
Upgrade to Micrometer 1.0.0-rc.3 and refactor existing
auto-configuration to align with updated APIs.

Note that Spring MVC instrumentation has now changed from an interceptor
to a Filter.

See gh-10906
7 years ago
Phillip Webb fa191d8c73 Align ReactiveWebApplicationContext with framework
Refactor `ReactiveWebApplicationContext` implementations to align closer
with the `WebApplicationContext` implementations defined in
Spring Framework.

The following classes are now provided:

  - `AnnotationConfigReactiveWebApplicationContext` -- A refreshable
    reactive web context with support for `@Configuration` classes.

  - `GenericReactiveWebApplicationContext` -- A non-refreshable reactive
    GenericApplicationContext.

  - `ReactiveWebServerApplicationContext` --  A non-refreshable reactive
    GenericApplicationContext with support for server discovery.

  - `AnnotationConfigReactiveWebServerApplicationContext` -- A
    non-refreshable reactive `GenericApplicationContext` with support
    for `@Configuration` classes and server discovery.

These classes roughly align to the following Servlet equivalents:

  - `AnnotationConfigWebApplicationContext` (Spring Framework)
  - `GenericWebApplicationContext` (Spring Framework)
  - `ServletWebServerApplicationContext` (Spring Boot)
  - `AnnotationConfigServletWebServerApplicationContext` (Spring Boot)

An additional `ConfigurableReactiveWebEnvironment` interface as also
been introduced, primarily for `@ConditionalOnWebApplication` to use.

Fixes gh-10852
7 years ago
Madhura Bhave 55b7a48bee Add missing conditionals 7 years ago
Phillip Webb 3f00ba3cad Polish 7 years ago
Madhura Bhave d50fe8874f Add CF support for reactive actuators
Closes gh-10780
7 years ago
Stephane Nicoll 9b8fefb0f4 Move micrometer export related keys under a common prefix #10858
Closes gh-10858
7 years ago
Phillip Webb c55b5d7111 Polish 7 years ago
Phillip Webb 44d8e09aac Polish endpoint parameter name discovery
Move logic from `ParameterNameMapper` into `ReflectiveOperationInvoker`
in order to reduce the surface area of the public API.

Also rename some classes for consistency.
7 years ago
Stephane Nicoll 74677629ff Remove handling of spring.git.properties
Closes gh-10857
7 years ago
Stephane Nicoll 9b6f0c83bf Add auto-configuration for DataSources
This commit automatically instruments all available data sources with
a configurable metric name. The instrumentation can be disabled in case
more control is needed.

Closes gh-10295
7 years ago
Stephane Nicoll dbb1e222ab Initialize only an embedded datasource by default
This commit renames spring.datasource.initialize to
spring.datasource.initialization-mode and use the
DataSourceInitializationMode enum. By default, only an embedded
datasource is initialized.

Closes gh-10773
7 years ago
Stephane Nicoll 56afc25304 Allow to customize the path of a web endpoint
This commit introduces a endpoints.<id>.web.path generic property that
allows to customize the path of an endpoint. By default the path is the
same as the id of the endpoint.

Such customization does not apply for the CloudFoundry specific
endpoints.

Closes gh-10181
7 years ago
Vedran Pavic ac10fa31cd Upgrade to Hazelcast 3.9
Closes gh-10764
7 years ago
Andy Wilkinson 2b426c30a6 Polish “Remove explicit type arguments”
Closes gh-10494
7 years ago
Johnny Lim 6168fae720 Remove explicit type arguments
See gh-10494
7 years ago
Andy Wilkinson a256602c7b Polish 7 years ago
Johnny Lim 44ae148ecd Polish
Closes gh-10700
7 years ago
Madhura Bhave df30d2fc10 Expose all endpoints under /cloudfoundryapplication
Regardless of whether the web endpoints have been enabled or not,
all endpoints for which beans are created need to be exposed in a
CF environment under /cloudfoundryapplication.

Closes gh-10673
7 years ago
Andy Wilkinson 688da652ac Polish 7 years ago
dreis2211 3b71393e0a Use Assert.state() with Supplier where possible
See gh-10658
7 years ago
Johnny Lim 5aa32b3d0f Polish
Closes gh-10636
7 years ago
Andy Wilkinson 0af4536316 Ensure media types are used consistently across endpoint mappings
Previously, the media types that are consumed and produced by
endpoints were configured in the web stack-specific configuration.
Furthermore, these configured media types were not used for the
discovery "endpoint" that links to all the available endpoints.

This commit introduces EndpointMediaTypes that is configred in a
single, central location and then used to configure the consumed and
produced media types for endpoints exposed via WebFlux, Web MVC, and
Jersey as well as the discovery "endpoint" provided by each.

Closes gh-10659
7 years ago
Madhura Bhave d307eba0a3 Add property to configure base-path for web endpoints.
Also, move properties corresponding to management server under
`management.server.*`.

Closes gh-10230
7 years ago
Spencer Gibb ce2058fa97 Change @ConditionalOnClass from Servlet to Flux
Update `ReactiveManagementContextAutoConfiguration` to check for a
`Flux` class rather than `Servlet`.

Closes gh-10590
7 years ago
Jon Schneider e2453a17c7 Add auto-configuration for exporting metrics to StatsD
Closes gh-10522
7 years ago
Jon Schneider ff636b58e1 Make the Graphite export protocol configurable
Closes gh-10523
7 years ago
Andy Wilkinson 7fc272df6e Start building against Micrometer snapshots for 1.0.0-rc.2 7 years ago
Andy Wilkinson 508aac084e Rename all Micrometer Clock beans: clock -> micrometerClock
Closes gh-10436
7 years ago
Phillip Webb b87f9c11f1 Fix POMs for the updated build/release process
Fix POMs following project relocations and apply CI friendly Maven
conventions.

See gh-9316
7 years ago
Phillip Webb 0ba4830b4f Relocate projects to spring-boot-project
Move projects to better reflect the way that Spring Boot is released.

The following projects are under `spring-boot-project`:

  - `spring-boot`
  - `spring-boot-autoconfigure`
  - `spring-boot-tools`
  - `spring-boot-starters`
  - `spring-boot-actuator`
  - `spring-boot-actuator-autoconfigure`
  - `spring-boot-test`
  - `spring-boot-test-autoconfigure`
  - `spring-boot-devtools`
  - `spring-boot-cli`
  - `spring-boot-docs`

See gh-9316
7 years ago