574 Commits

Author SHA1 Message Date
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
8c0c0ee55a Merge branch '2.0.x' 2018-05-03 12:44:58 -07:00
Phillip Webb
e125085993 Merge branch '1.5.x' into 2.0.x 2018-05-03 12:43:50 -07:00
Andy Wilkinson
0526594a3c Merge branch '2.0.x' 2018-05-02 12:26:23 +01:00
Stephane Nicoll
0fcffae0d9 Merge branch '2.0.x' 2018-04-30 16:50:51 +02:00
Johnny Lim
d8700522d3 Rename nested *AutoConfiguration classes to *Configuration
Closes gh-12989
2018-04-30 16:50:18 +02:00
Stephane Nicoll
fb8a5a9864 Polish "Add cache actuator endpoint"
This commit improves the initial proposal by providing a by name read
operation that returns the detail of a particular cache. It also adds
more tests and complete API documentation for the feature.

Closes gh-12216
2018-04-30 16:34:00 +02:00
Johannes Edmeier
1a57673345 Add cache actuator endpoint
This commits adds an actuator endpoint which lists the caches per
context and cacheManager and provides a delete operation to clear the
caches. As the statistics are exposed via the metrics endpoint they are
not included

See gh-12216
2018-04-30 16:34:00 +02:00
Brian Clozel
1ef0098ab5 Add WebClient metrics support
This commit adds support for Actuator Metrics for WebClient.
This support mirrors the current behavior for `RestTemplate`, reusing
the same metric name `"http.client.requests"` and tags.

`WebClient` is instrumented by a `MetricsWebClientFilterFunction` which
is applied by a `WebClientCustomizer`. This instrumentation happens
automatically only if you create an instance of `WebClient` using an
auto-configured `WebClient.Builder` bean.

This infrastructure is reusing de facto the `MeterFilter` that has been
added for `RestTemplate` in order to limit the "uri" tag cardinality.

Closes gh-12228
2018-04-27 13:54:14 +02:00
Johnny Lim
b45c5f1a27 Polish
See gh-12981
2018-04-27 09:34:32 +02:00
Stephane Nicoll
03cf4fbb10 Polish "Add actuator endpoint for exposing the Spring Integration graph"
Closes gh-12331
2018-04-25 16:16:43 +02:00
Tim Ysewyn
8c67ef1079 Add actuator endpoint for exposing the Spring Integration graph
See gh-12331
2018-04-25 16:16:43 +02:00
Stephane Nicoll
518f41a4ae Improve @ConditionalOnEnabledEndpoint to be used on any component
This commit adds an `endpoint` attribute so that the condition can be
used on arbitrary components, not only endpoints or extensions.

Closes gh-12945
2018-04-25 13:54:04 +02:00
Stephane Nicoll
760b5e8510 Merge branch '2.0.x' 2018-04-24 10:18:20 +02:00
Johnny Lim
a15319ee30 Remove ManagementServerProperties.addApplicationContextHeader
Closes gh-12926
2018-04-24 10:16:49 +02:00
Stephane Nicoll
a85998f4c3 Polish "Add auto-configuration for Hibernate metrics"
Closes gh-12550
2018-04-17 13:46:27 +02:00
Rui Figueira
b6b92ba937 Add auto-configuration for Hibernate metrics
All Hibernate entityManagerFactories are automatically instrumented
and their statistics are included into Micrometer using its
HibernateMetrics binder.

Closes gh-12550
2018-04-17 13:23:18 +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
Andy Wilkinson
f758a4ddd5 Do not link to controller endpoints in Jersey-based Actuator
Closes gh-12463
2018-03-13 14:55:51 +00:00
dreis2211
a21ea612db Remove duplicated @author tags
Closes gh-12454
2018-03-13 08:51:17 +01:00
igor-suhorukov
93f9bd0a32 Polish
Closes gh-12450
2018-03-13 08:37:50 +01:00
Madhura Bhave
89e42d40c5 Provide security matchers for actuator links
Fixes gh-12353
2018-03-07 19:02:35 -08:00
Andy Wilkinson
317b51f2ad Make ApplicationContextRequestMatcher and subclasses thread-safe
Previously, when performing lazy initialisation of the context,
ApplicationContextRequestMatcher assigned the context field before it
called initialized. The context being non-null is used as the signal
that it’s ok to call a subclass’s matches method. If one thread checks
for a non-null context in between the field being assigned and
initialized being called on another thread, matches will be called
before the subclass is ready.

This commit closes the window for the race condition by only assigning
the context field once the subclass’s initialized method has been
called.

There is a secondary problem in each of the subclasses. Due to the use
of double-checked locking in ApplicationContextRequestMatcher, it’s
possible for a subclass’s matches method to be called by a thread that
has not synchronised on the context lock that’s held when initialized
is called and the delegate field is assigned. This means that the
value assigned to the field may not be visible to that thread.

This commit declares the delegate field of each
ApplicationContextRequestMatcher subclass as volatile to ensure that,
following initialisation, its value is guaranteed to be visible to
all threads.

Closes gh-12380
2018-03-07 11:37:01 +00:00
Madhura Bhave
e6eca04af2 Make EndpointRequestMatcher#excluding public
Fixes gh-12354
2018-03-05 16:07:46 -08:00