Commit Graph

480 Commits

Author SHA1 Message Date
Andy Wilkinson
e7f100d5d7 Improve test coverage of PropertiesMeterFilter
Closes gh-14689
2018-10-05 08:37:19 +01:00
Stephane Nicoll
1b10d3fcbf Fix missing metadata for nested POJO
This commit fixes missing descriptions and default values when
applicable for `management.server.ssl`, `server.compression`,
`server.http2`, `server.servlet.jsp`, `server.servlet.session` and
`server.ssl`.

Those nested namespace are managed by a POJO that is declared outside
of the module of the target @ConfigurationProperties type using it. As
a result, the annotation processor has no access to the source model and
can't extract the description and the default value, if any.

This commit migrates the misleading field-level Javadoc to manual meta
data for the time being.

Closes gh-14669
2018-10-04 15:49:04 +02:00
Madhura Bhave
7af6665a0e Ignore management.server.port for war
Fixes gh-14148
2018-09-11 16:56:03 -07:00
Stephane Nicoll
ff8b8c55c6 Remove reference to "management.metrics.binders.integration.enabled"
Closes gh-14319
2018-09-06 12:17:57 +02:00
Madhura Bhave
9c82d5c382 Make ApplicationContextServerWebExchangeMatcher and subclasses thread-safe
Fixes gh-14161
2018-09-04 17:06:24 -07:00
Johnny Lim
ca57e58ee5 Polish
See gh-14293
2018-09-04 08:52:13 +02:00
Stephane Nicoll
0625443d27 Polish "Limit metrics collection of incoming requests"
Closes gh-14173
2018-08-30 12:59:07 +02:00
Dmytro Nosan
81a6701914 Limit metrics collection of incoming requests
See gh-14173
2018-08-30 12:26:06 +02:00
Stephane Nicoll
000cb94323 Polish "Fix String concatenation in a loop"
Closes gh-14153
2018-08-22 10:47:05 +02:00
Hiroaki Yoshida
43acc37587 Fix String concatenation in a loop
See gh-14153
2018-08-22 10:46:14 +02:00
Stephane Nicoll
b0d388830f Polish test 2018-08-20 17:00:21 +02:00
Madhura Bhave
b93c2b9a9f Allow actuator endpoints to be used with mvcMatchers
This commit changes AbstractWebMvcEndpointHandlerMapping to
be a MatchableHandlerMapping. Additionally, EndpointRequest,
now delegates to MvcRequestMatcher for Spring MVC applications.

For all other applications, AntPathRequestMatcher is used as
a delegate.

Closes gh-13962
2018-08-16 15:41:02 -07:00
Stephane Nicoll
a023bd030a Add configurable timeout for Couchbase health indicator
This commit makes sure to use a configurable timeout to check if the
Couchbase cluster is up, rather than relying on the default that can be
quite long.

Closes gh-13879
2018-08-08 16:01:58 +02:00
Stephane Nicoll
737b4a275b Polish 2018-08-03 18:24:59 +02:00
Johnny Lim
7b6b91aae7 Return null immediately when sla is null in convertSla()
Closes gh-13991
2018-08-03 09:23:22 +02:00
Phillip Webb
0ec22c8bf9 Polish copyright date on changed files 2018-07-29 09:29:29 +01:00
Phillip Webb
aeb885192e Polish ternary expressions 2018-07-29 09:24:46 +01:00
Phillip Webb
e6a68b39a3 Fix checkstyle javadoc issues
Fix checkstyle issues in javadoc following the spring-javaformat
upgrade.

See gh-13932
2018-07-28 01:11:52 +01:00
Phillip Webb
7fc455654a Fix checkstyle ternary issues
Fix checkstyle issues with ternary expressions following the
spring-javaformat upgrade.

See gh-13932
2018-07-28 01:11:52 +01:00
Madhura Bhave
e753b530fa EndpointRequest should match links with trailing slash
Fixes gh-13921
2018-07-27 12:23:27 -07:00
Phillip Webb
9a9111af21 Support path discovery for main dispatcher servlet
Add an `DispatcherServletPath` interface which provides a much more
consistent way to discover the path of the main dispatcher servet.

Prior to this commit, auto-configurations would often make use of the
`ServerProperties` class to discover the dispatcher servlet path. This
mechanism isn't very explicit and also makes it hard for us to relocate
that property in Spring Boot 2.1.

This commit also reverts most of fddc9e9c7e since it is now clear that
the supporting multiple dispatcher servlet paths will be much more
involved that we originally anticipated.

Closes gh-13834
2018-07-26 11:35:12 +01:00
Phillip Webb
d37e717500 Polish 2018-07-26 11:35:12 +01:00
Stephane Nicoll
7176c54f5e Polish "Add metric description and base unit to metrics endpoint"
Closes gh-13813
2018-07-24 09:32:22 +02:00
Johannes Edmeier
ab1f8cf77b Add metric description and base unit to metrics endpoint
See gh-13813
2018-07-24 09:32:22 +02:00
Stephane Nicoll
ecb8da2536 Polish "Upgrade to Micrometer 1.0.6"
Closes gh-13819
2018-07-24 09:25:54 +02:00
Jon Schneider
f478911c54 Upgrade to Micrometer 1.0.6
See gh-13819
2018-07-24 09:12:06 +02:00
Johnny Lim
86ccb26c58 Polish EndpointRequest.RequestMatcherFactory.antPath()
Closes gh-13775
2018-07-17 16:53:33 -07:00
Andy Wilkinson
a57d0f0853 Reinstate order of WebMvcMetricsFilter
Closes gh-13781
2018-07-17 19:14:17 +01:00
Stephane Nicoll
d6c7eff8f7 Add check for empty values for lookup
Closes gh-13419
2018-07-17 12:01:26 +02:00
Johnny Lim
f363fe7dd1 Polish
See gh-13790
2018-07-17 10:03:41 +02:00
Stephane Nicoll
e6ea28dec5 Polish 2018-07-13 09:36:37 +02:00
Johnny Lim
13202eb278 Prevent duplicate RequestMatcher in RequestMatcherFactory.antPath()
Closes gh-13706
2018-07-13 09:35:34 +02:00
Johnny Lim
f94ce495d8 Fix parameter order for RequestMatcherAssert.doesNotMatch()
Closes gh-13707
2018-07-10 11:36:47 -07:00
Stephane Nicoll
44b9aa168e Polish "Improve description of Endpoint exclude"
Closes gh-13619
2018-07-09 13:20:43 +02:00
Miguel Gomes
838e6cdbbb Improve description of Endpoint exclude
See gh-13619
2018-07-09 13:12:13 +02:00
Madhura Bhave
fddc9e9c7e Support multiple paths in DispatcherServletPathProvider
Closes gh-13603
2018-06-28 12:36:58 -07:00
Johnny Lim
b9ea0fd5a7 Polish
See gh-13534
2018-06-21 09:20:50 +02:00
Johnny Lim
dd3bfdbe42 Use @ManagementContextConfiguration consistently 2018-06-18 13:28:30 +02:00
Johnny Lim
870d7fe16a Use @SpringBootTest.properties in tests and samples
Closes gh-13453
2018-06-13 09:24:28 +02:00
Madhura Bhave
461202bc25 EndpointRequest uses empty servlet path if not available
Fixes gh-13399
2018-06-06 10:48:42 -07:00
dreis2211
ba8a32fa4e Replace commons-codec Base64 usage
See gh-13378
2018-06-06 09:19:17 +02:00
Stephane Nicoll
bf56ec496d Polish 2018-06-05 13:29:56 +02:00
Stephane Nicoll
fff06822dc Polish 2018-06-05 13:15:38 +02:00
Stephane Nicoll
d84e2b90d7 Fix wrong usage of ManagementContextConfiguration
Closes gh-13366
2018-06-05 13:15:21 +02:00
Stephane Nicoll
b4f8361989 Make JMX metrics domain configurable
Closes gh-13356
2018-06-05 10:12:26 +02:00
Phillip Webb
571c50e43f Switch to functional web code to use static imports
Update the samples and tests to use the more idiomatic static import
style.
2018-06-04 17:27:34 -07:00
Andy Wilkinson
68cd27c47b Do not require DataSourcePoolMetrics to auto-configure Hikari meters
Closes gh-13330
2018-06-01 17:55:43 +01:00
Johnny Lim
f385a1cb11 Polish
Closes gh-13243
2018-05-28 09:36:15 +02:00
Phillip Webb
9fd3b9103a Format code 2018-05-25 23:02:45 -07:00
Madhura Bhave
552878c431 Fix javadoc 2018-05-25 10:37:39 +02:00
Phillip Webb
2dc4f1df00 Polish 2018-05-21 21:32:42 -07:00
Stephane Nicoll
48cf025093 Polish 2018-05-18 13:42:45 +02:00
Stephane Nicoll
6893be5479 Make sure that RabbitMQ metrics are configured early
The ConnectionFactory can be used early in user configuration to
configure an `Exchange`. Such connection may not hold the proper
MetricCollector and can be cached, leading to missed metrics
information.

This commit moves the configuration of RabbitMQ metrics to a
BeanPostProcessor so that the proper MetricCollector is configured
before any connection is created.

Closes gh-12855
2018-05-18 11:54:11 +02:00
Madhura Bhave
05cf8229d9 Fix tests 2018-05-10 11:50:43 -07:00
Madhura Bhave
c937bb68a0 ServletEndpoints should take servletPath into account
Fixes gh-13106
2018-05-10 10:01:11 -07:00
Madhura Bhave
4ec87956f9 Fix EndpointRequest include/exclude for ServletEndpoints
Fixes gh-13089
2018-05-09 12:01:58 -07:00
Andy Wilkinson
e14a2e33ab Deprecate queue size property for StatsD metrics export
Closes gh-13108
2018-05-09 09:14:09 +01:00
Andy Wilkinson
c826310fd1 Polish 2018-05-09 08:44:15 +01:00
Andy Wilkinson
8ce4110966 Allow Jersey-based Actuator to be used with separate management port
Previously, when the Jersey-based Actuator was configure with a
separate management port, the resulting child context would fail to
start due to their being no ResourceConfigCustomizer beans available.

This commit updates the configuration so that the customizer's are
injected using an ObjectProvider and an empty list is used in the
event of their being no customizer beans. This aligns the child
context configuration class with JerseyAutoConfiguration which
already used this approach.

Closes gh-12975
2018-05-08 21:00:05 +01:00
Stephane Nicoll
9dccf5b895 Polish
See gh-13078
2018-05-07 14:48:56 +02:00
Phillip Webb
6556bb2e89 Fix checkstyle violations 2018-05-04 20:13:57 -07:00
Phillip Webb
975e986fef Polish 2018-05-04 20:06:27 -07:00
Madhura Bhave
469372c5ef Account for servlet path "/" in EndpointRequest
See gh-12934
2018-05-04 18:09:15 -07:00
Phillip Webb
6de479fe6a Polish 2018-05-04 16:08:05 -07:00
Phillip Webb
93046d058d Polish 2018-05-04 16:05:12 -07:00
Madhura Bhave
6855c5556d EndpointRequest should consider server.servlet.path
Fixes gh-12934
2018-05-04 16:03:31 -07:00
Phillip Webb
5b3cb8a698 Update copyright header year for changed files 2018-05-04 15:59:26 -07:00
Phillip Webb
6e09e497f2 Formatting 2018-05-04 12:06:19 -07:00
Phillip Webb
2d70a7ae5e Polish caught exception names
Prefer `ex` over `e`.
2018-05-03 22:43:32 -07:00
Phillip Webb
41efea51a7 Polish ternary expressions
Consistently format ternary expressions and always favor `!=` as the
the check.
2018-05-03 22:43:12 -07:00
Phillip Webb
e125085993 Merge branch '1.5.x' into 2.0.x 2018-05-03 12:43:50 -07:00
Johnny Lim
d8700522d3 Rename nested *AutoConfiguration classes to *Configuration
Closes gh-12989
2018-04-30 16:50:18 +02:00
Johnny Lim
a15319ee30 Remove ManagementServerProperties.addApplicationContextHeader
Closes gh-12926
2018-04-24 10:16:49 +02:00
dreis2211
2bbf438c36 Fix duplicate words in comments
Closes gh-12866
2018-04-16 08:09:40 +02:00
Stephane Nicoll
3c169b4e0a Fix bean name of EnvironmentEndpointWebExtension
Closes gh-12827
2018-04-11 11:34:44 +02:00
Johnny Lim
f03849d502 Polish
See gh-12812
2018-04-10 11:46:16 +02:00
Andy Wilkinson
8d5b9f37d5 Merge branch '1.5.x' 2018-04-09 17:59:53 +01:00
Jon Schneider
03158e2fd5 Upgrade to Micrometer 1.0.3
Closes gh-12767
2018-04-04 20:42:23 -07:00
Phillip Webb
685babc829 Polish "Use lambdas for map entry iteration where possible"
Closes gh-12626
2018-04-04 19:36:18 -07:00
igor-suhorukov
69bc19e0ca Use lambdas for map entry iteration where possible
See gh-12626
2018-04-04 19:36:10 -07:00
Phillip Webb
598e9bb842 Polish 2018-04-04 18:01:25 -07:00
Phillip Webb
ce9ca6ae70 Polish "Apply MeterRegistryCustomizer to composites"
Closes gh-12762
2018-04-04 16:00:53 -07:00
Jon Schneider
1fce462944 Apply MeterRegistryCustomizer to composites
Update `MeterRegistryConfigurer` to also apply customizers to
composite meter registries. Prior to this commit composites were
skipped due to the incorrect assumption that did not contain
their own state.

Closes gh-12762
2018-04-04 15:58:16 -07:00
Stephane Nicoll
7dbeaaa932 Polish "Remove HierarchicalNameMapper as a configured @Bean"
Closes gh-12683
2018-04-03 11:23:05 +02:00
Jon Schneider
8572a091b8 Remove HierarchicalNameMapper as a configured @Bean
HierarchicalNameMapper is not a component that can be shared amongst
multiple monitoring systems.

See gh-12683
2018-04-03 11:14:43 +02:00
Stephane Nicoll
7c36c00331 Fix default HierarchicalNameMapper implementation for Graphite
Closes gh-12557
2018-04-03 10:39:14 +02:00
Johnny Lim
4ab439856c Remove destroyMethod attribute in @Bean for MeterRegistry
Closes gh-12725
2018-04-03 10:14:13 +02:00
Madhura Bhave
270ee6dd2c Configure RequestContextFilter in mgmt context
Closes gh-12546
2018-04-02 11:16:46 -07:00
Andy Wilkinson
cca5c0d2ee Start building against Spring REST Docs 2.0.1 snapshots
See gh-12681
2018-03-29 14:22:55 +01:00
dreis2211
3b0f6e7168 Use Supplier variants of Assert methods
See gh-12630
2018-03-26 17:58:17 +02:00
Johnny Lim
c100510222 Remove value in @ConditionalOnMissingBean if possible
See gh-12604
2018-03-26 17:38:46 +02:00
Johnny Lim
625bf93598 Polish
See gh-12584
2018-03-26 17:33:25 +02:00
Johnny Lim
1e2e8b1d66 Rename expose to include
Closes gh-12555
2018-03-21 07:35:37 -04:00
Andy Wilkinson
72e36eadae Polish 2018-03-17 15:28:05 +00:00
Phillip Webb
c201c1dac1 Polish 2018-03-15 16:09:14 -07:00
Madhura Bhave
e6149fda1c Assert endpoints basePath starts with '/' or is empty
Fixes gh-12489
2018-03-15 11:39:37 -07:00
Vladimir Tsanev
bf433e7f17 Fix Javadoc for ServiceLevelAgreementBoundary
Closes gh-12492
2018-03-15 13:40:13 +01:00
dreis2211
8626daf135 Replace Mockito.times(0) with Mockito.never()
Closes gh-12475
2018-03-14 15:12:20 -07:00
Phillip Webb
a4b0be089d Polish 2018-03-14 14:05:26 -07:00
Andy Wilkinson
2f1b2e3ce2 Log summary of web-exposed endpoints during startup
Closes gh-12442
2018-03-13 14:55:51 +00:00