- Spring Boot:
2.6.5withspring-boot-starter-actuator micrometer-registry-prometheus:1.8.4for exposing prometheus metrics
I think there is a bug with MeterFilter.accept.
The following config ouputs all the metrics even though MeterFilter.acceptis returning false (hardcoded).
@Configuration
public class MetricConfiguration {
private static final String IGNORED_TAGS[] = {"main-application-class"};
@Bean
MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
return registry -> registry.config()
// .meterFilter(ignoreTags(IGNORED_TAGS))
.meterFilter(accept(t -> false));
}
}
Meanwhile, ignoreTags, if commented in, is working fine (the config is working).
Comment From: mbhave
MeterFilter is part of the Micrometer project. Please create an issue in their issue tracker so that the Micrometer team can take a look.