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
When there are multiple MeterRegistry beans and none of them is marked @Primary, auto-configuration creates a @Primary composite meter registry that contains every MeterRegistry bean. In such a situation, MeterRegistryPostProcessor will bind and MeterBinder beans to every CompositeMeterRegistry in the context. This works as intended when the auto-configured composite is the only CompositeMeterRegistry. However, when there's a user-defined composite as well as the auto-configured composite, it results in meters being bound twice to the user-defined composite: once directly when the user-defined composite is post-processed and once when the auto-configured composite cascades the binding down to the meter registries that it contains.
When the context contains an auto-configured composite, we should ignore every meter registry other than the auto-configured composite.