INT-4423: Make Micrometer dependency optional

JIRA: https://jira.spring.io/browse/INT-4423

Add a facade on top of micrometer so the dependency can
be optional.t

Next iteration - PR comments

Checkstyle

More polishing; static classes etc.

checkstyle

Further polishing; docs; auto-register `MicrometerMetricsCaptor`.

Polishing - move captor load to a static method on the captor.

* Fix Checkstyle violation
* Some code style polishing
This commit is contained in:
Gary Russell
2018-03-03 16:24:35 -05:00
committed by Artem Bilan
parent a92933e800
commit 6718d8d433
24 changed files with 605 additions and 415 deletions

View File

@@ -101,8 +101,10 @@ Starting with _version 5.0.2_, the framework will automatically detect if there
Starting with _version 5.0.3_, the presence of a https://micrometer.io/[Micrometer] `MeterRegistry` in the application context will trigger support for Micrometer metrics in addition to the inbuilt metrics (inbuilt metrics will be removed in a future release).
IMPORTANT: Micrometer was first supported in _version 5.0.2_, but changes were made to the Micrometer `Meters` in _version 5.0.3_ to make them more suitable for use in dimensional systems.
Further changes were made in 5.0.4; if using Micrometer, a minimum of version 5.0.4 is recommended since some of the changes in 5.0.4 were breaking API changes.
Simply add a `MeterRegistry` bean of choice to the application context.
If the `IntegrationManagementConfigurer` detects exactly one `MeterRegistry` bean, it will configure a `MicrometerMetricsCaptor` bean with name `integrationMicrometerMetricsCaptor`.
For each `MessageHandler` and `MessageChannel`, timers are registered.
For each `MessageSource`, a counter is registered.

View File

@@ -308,6 +308,7 @@ http://micrometer.io/[Micrometer] application monitoring is now supported (since
See <<micrometer-integration>> for more information.
IMPORTANT: Changes were made to the Micrometer `Meters` in _version 5.0.3_ to make them more suitable for use in dimensional systems.
Further changes were made in 5.0.4; if using Micrometer, a minimum of version 5.0.4 is recommended.
==== @EndpointId Annotations