You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The spring-integration actuator endpoint should still work when multiple MeterRegistry beans have been registered (which is a use case that the regular spring metrics actuator endpoint supports).
Current Behavior
The spring-integration actuator endpoint doesn't work when multiple MeterMeterRegistry beans have been regsitered, see
The regular spring metrics actuator endpoint supports multiple MeterRegistry beans, and it would be great if the spring-integration actuator endpoint had similar support, see
/**
* Return an instance (possibly shared or independent) of the object
* managed by this factory.
* @return an instance of the bean, or {@code null} if not available or
* not unique (i.e. multiple candidates found with none marked as primary)
* @throws BeansException in case of creation errors
* @see #getObject()
*/
@Nullable
default T getIfUnique() throws BeansException {
This way MicrometerNodeEnhancer would rely on the mentioned AutoConfiguredCompositeMeterRegistry which is marked as @Primary.
… bean
Fixes: #9335
Spring Boot provides a `CompositeMeterRegistry` bean marked with a `@Primary`.
So, this one has to be autowired whenever we would like to deal with application
environment.
The `MicrometerNodeEnhancer` has a flaw to skip `MeterRegistry` injection if we have more than one `MeterRegistry` bean.
* Fix `MicrometerNodeEnhancer` logic to use `ObjectProvider.getIfUnique()` API
which is able to deal with the `primary` properly.
Otherwise, `null` as it was before
(cherry picked from commit e0472d8)
… bean
Fixes: #9335
Spring Boot provides a `CompositeMeterRegistry` bean marked with a `@Primary`.
So, this one has to be autowired whenever we would like to deal with application
environment.
The `MicrometerNodeEnhancer` has a flaw to skip `MeterRegistry` injection if we have more than one `MeterRegistry` bean.
* Fix `MicrometerNodeEnhancer` logic to use `ObjectProvider.getIfUnique()` API
which is able to deal with the `primary` properly.
Otherwise, `null` as it was before
(cherry picked from commit e0472d8)
Expected Behavior
The spring-integration actuator endpoint should still work when multiple MeterRegistry beans have been registered (which is a use case that the regular spring metrics actuator endpoint supports).
Current Behavior
The spring-integration actuator endpoint doesn't work when multiple MeterMeterRegistry beans have been regsitered, see
spring-integration/spring-integration-core/src/main/java/org/springframework/integration/graph/MicrometerNodeEnhancer.java
Lines 61 to 67 in cfb6333
Context
The regular spring metrics actuator endpoint supports multiple MeterRegistry beans, and it would be great if the spring-integration actuator endpoint had similar support, see
I have not found any workaround to make the spring-integration actuator endpoint work when multiple MeterRegistry beans have been registered.
The text was updated successfully, but these errors were encountered: