Build: #92 was successful Changes by Artem Bilan <abilan@vmware.com>

Build result summary

Details

Completed
Duration
10 minutes
Labels
None
Agent
bamboo-23.af.pivotal.io
Revision
a2a8764481c5433ddbc35a839bd35a947edadc0f a2a8764481c5433ddbc35a839bd35a947edadc0f
Total tests
5280
Successful since
#83 ()

Tests

Code commits

Author Commit Message Commit date
Artem Bilan <abilan@vmware.com> Artem Bilan <abilan@vmware.com> a2a8764481c5433ddbc35a839bd35a947edadc0f a2a8764481c5433ddbc35a839bd35a947edadc0f GH-3376: Remove gauges on application ctx close (#3377)
* GH-3376: Remove gauges on application ctx close

Fixes https://github.com/spring-projects/spring-integration/issues/3376

The `MeterRegistry` may request meters on application shutdown.
The gauges for channels, handlers and message sources don't make sense
at the moment since all those beans are going to be destroyed.

* Remove gauges for channel, handler and message source numbers from the
`IntegrationManagementConfigurer.destroy()`

**Cherry-pick to 5.3.x & 5.2.x**

* * Add `MicrometerImportSelector` to conditionally load
a  `MicrometerMetricsCaptorConfiguration` when `MeterRegistry`
is on class path.
* Make `MicrometerMetricsCaptorConfiguration.integrationMicrometerMetricsCaptor()`
 bean dependant on the `ObjectProvider<MeterRegistry>`
* Make `IntegrationManagementConfiguration.managementConfigurer()`
dependant on the `ObjectProvider<MetricsCaptor>`.
This way the `IntegrationManagementConfigurer` is destroyed before
`MeterRegistry` when application context is closed
* Deprecate `MicrometerMetricsCaptor.loadCaptor()` in favor of
`@Import(MicrometerImportSelector.class)`

* * Add `MicrometerMetricsCaptorRegistrar` to register a `MICROMETER_CAPTOR_NAME`
bean when `MeterRegistry` is on class path and no `MICROMETER_CAPTOR_NAME` bean yet.
* Make `IntegrationManagementConfiguration.managementConfigurer()`
dependant on the `ObjectProvider<MetricsCaptor>`.
This way the `IntegrationManagementConfigurer` is destroyed before
`MeterRegistry` when application context is closed
* Deprecate `MicrometerMetricsCaptor.loadCaptor()` in favor of
`@Import(MicrometerMetricsCaptorRegistrar.class)`
* Fix test to make a `MeterRegistry` bean as `static` since
`@EnableIntegrationManagement` depends on this bean definition now

# Conflicts:
#        spring-integration-core/src/main/java/org/springframework/integration/config/EnableIntegrationManagement.java
#        spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationManagementConfiguration.java
#        spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationManagementConfigurer.java

* Fix some deprecation warnings

# Conflicts:
#        spring-integration-core/src/main/java/org/springframework/integration/config/IntegrationManagementConfigurer.java

Jira issues

IssueDescriptionStatus
Unknown Issue TypeGH-3376Could not obtain issue details from Jira