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
In the case I configure micronaut.metrics.tags.* I expect those tags being added to every Micrometer meter being created.
Actual Behaviour
In some cases the meters created by io.micronaut.configuration.metrics.aggregator.CompositeMeterRegistryConfigurer#addBinders are not having those common tags. This is because the execution order of io.micronaut.configuration.metrics.aggregator.CompositeMeterRegistryConfigurer and io.micronaut.configuration.metrics.common.tags.CommonTagsConfigurer is not defined. In case io.micronaut.configuration.metrics.micrometer.MeterRegistryFactory#compositeMeterRegistry executes CompositeMeterRegistryConfigurer before CommonTagsConfigurer, the common tags are not yet configured but some meters have already been created.
Steps To Reproduce
Difficult to reproduce because the mentioned order of io.micronaut.configuration.metrics.aggregator.MeterRegistryConfigurer is not configurable.
Just as background information: I've stumbled over this issue while implementing a MeterRegistry implementation for the Prometheus Remote_Write protocol which I want to use for monitoring Java batch jobs based on Micronaut.
Expected Behavior
In the case I configure
micronaut.metrics.tags.*
I expect those tags being added to every Micrometer meter being created.Actual Behaviour
In some cases the meters created by
io.micronaut.configuration.metrics.aggregator.CompositeMeterRegistryConfigurer#addBinders
are not having those common tags. This is because the execution order ofio.micronaut.configuration.metrics.aggregator.CompositeMeterRegistryConfigurer
andio.micronaut.configuration.metrics.common.tags.CommonTagsConfigurer
is not defined. In caseio.micronaut.configuration.metrics.micrometer.MeterRegistryFactory#compositeMeterRegistry
executesCompositeMeterRegistryConfigurer
beforeCommonTagsConfigurer
, the common tags are not yet configured but some meters have already been created.Steps To Reproduce
Difficult to reproduce because the mentioned order of
io.micronaut.configuration.metrics.aggregator.MeterRegistryConfigurer
is not configurable.Environment Information
micronaut-micrometer-core: v4.2.1
micronaut: v3.4.3
Example Application
No response
Version
3.4.3
The text was updated successfully, but these errors were encountered: