Skip to content

No metrics with @EnableIntegrationManagement #3643

@MartinHochstrasser

Description

@MartinHochstrasser

In what version(s) of Spring Integration are you seeing this issue?

5.5.4 (Spring Boot 2.5.5)
5.5.3 (Spring Boot 2.5.4)
5.5.2 (Spring Boot 2.5.3)
5.5.1 (Spring Boot 2.5.2)
5.5.0 (Spring Boot 2.5.1)

5.4.11 (Spring Boot 2.4.10)
5.4.10 (Spring Boot 2.4.10)
5.4.9 (Spring Boot 2.4.9)
5.4.8 (Spring Boot 2.4.9)
5.4.7 (Spring Boot 2.4.7)
5.4.6 (Spring Boot 2.4.5)
5.4.5 (Spring Boot 2.4.4)
(did not test earlier 5.4.x versions)

5.3.9.RELEASE (Spring Boot 2.3.12.RELEASE)
5.3.8.RELEASE (Spring Boot 2.3.12.RELEASE)
5.3.7.RELEASE (Spring Boot 2.3.10.RELEASE)
5.3.6.RELEASE (Spring Boot 2.3.9.RELEASE)
(did not test earlier 5.3.x versions)

maybe also on earlier versions, but did not test.

Describe the bug

If @EnableIntegrationManagement annotation is added to the application configuration to disable logging, Spring Integration no longer provides metrics.

This is probably related to the fixed bug #3420
If the @EnableIntegrationManagement annotation is present, Spring Integration tries to set up the MicrometerMetricsCaptor before spring boot provides the MeterRegistry bean.

To Reproduce

Add @EnableIntegrationManagement annotation to Spring Integration application that provides metrics.

Expected behavior

If a MeterRegistry bean is present (provided through Spring Boot), Spring Integration should provide metrics as described in documentation even if a @EnableIntegrationManagement annotation is present.

Sample

https://github.com/MartinHochstrasser/spring-integration-metrics-issue

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions