micronaut-micrometer
micronaut-micrometer copied to clipboard
exclude urls
Issue description
I would like to exclude some of urls such as healthcheck or prometheus endpoints. These urls are creating noisy metrics. Is it possible to exclude them?
I am in same situation here, I would like to exclude for example threaddump and others not necessary for my application.
only way currently appears to be to set micronaut.metrics.http.path
https://github.com/micronaut-projects/micronaut-micrometer/blob/02ceec4210fa5c7065943791551f68e0cd8dfa4f/micrometer-core/src/main/java/io/micronaut/configuration/metrics/binder/web/ServerRequestMeterRegistryFilter.java#L44
Otherwise a PR would be needed to this type to allow configuring which URIs are included/excluded
Tracing has the exclusion support, I was hoping you could do Filter(/**,!/prometheus/**,!/health/**)
or something but it still applies to everything. Maybe I just failed at the Ant Pattern Matching