You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2023/03/13 06:32:00 UTC

[jira] [Updated] (CAMEL-19137) Favor CompositeMeterRegistry instances in Camel registry

     [ https://issues.apache.org/jira/browse/CAMEL-19137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-19137:
--------------------------------
    Fix Version/s: 3.21.0
                   4.0-M3
                       (was: 3.x)

> Favor CompositeMeterRegistry instances in Camel registry
> --------------------------------------------------------
>
>                 Key: CAMEL-19137
>                 URL: https://issues.apache.org/jira/browse/CAMEL-19137
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-micrometer
>    Affects Versions: 3.18.3
>            Reporter: Adriano Marcondes Machado
>            Priority: Minor
>             Fix For: 3.21.0, 4.0-M3, 4.0
>
>
> When Spring Boot detects more than one instance of `MeterRegistry` in the application context configuration (for example, both `meter-registry-jmx` and `meter-registry-prometheus` are on the classpath and the actuator endpoint for Prometheus is enabled), the auto-configuration adds an instance of `CompositeMeterRegistry` and configures it as the primary bean.
> When the micrometer component starts, it looks for an instance of `MeterRegistry` on Camel registry with the name `MicrometerConstants.METRICS_REGISTRY_NAME`. If not found, the component tries to locate a single instance of any `MeterRegistry` object on the registry.
> In the previous example configuration, there will be 3 instances of `MeterRegistry`, and the current behavior is to create a new instance of `MeterRegistry` to use.
> This changes the default behavior to look first for instances of `CompositeMeterRegistry` before looking for instances of `MeterRegistry`.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)