-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random "There is already an existing meter named" exception after adding "meterRegistry.config().commonTags" #114
Comments
I was able to add common tag by MeterFilter:
But still:
|
I have been able to reproduce that not all metrics may have the common tag. However, I've never got an exception. Would you mind sharing a sample app? |
This seems to work: @Singleton
public class CustomMicrometerMeterRegistryConfigurer implements MeterRegistryConfigurer {
@Override
public void configure(MeterRegistry meterRegistry) {
meterRegistry.config().meterFilter(MeterFilter.commonTags(singletonList(Tag.of("scope", "demo"))));
}
@Override
public boolean supports(MeterRegistry meterRegistry) {
return true;
}
} |
I was also facing the issue of tags randomly missing and reappearing between container restarts. The reason of this bug is described in #417. They are duplicates. This also explains why registering a |
Hello. I use following modules:
According to this documentation I created MeterRegistryConfigurer to add common tag:
After that metrics behavior becomes pretty unpredictable. After application restart, the following may occur:
Application is run by Intellij IDEA (not grade)
Why application behavior becomes random? Shouldn't it be predictable?
The text was updated successfully, but these errors were encountered: