micronaut-micrometer icon indicating copy to clipboard operation
micronaut-micrometer copied to clipboard

exclude urls

Open cemo opened this issue 3 years ago • 3 comments

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?

cemo avatar Aug 09 '21 22:08 cemo

I am in same situation here, I would like to exclude for example threaddump and others not necessary for my application.

arthemus avatar Jan 14 '22 13:01 arthemus

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

graemerocher avatar Jan 17 '22 11:01 graemerocher

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

scprek avatar Jan 30 '24 18:01 scprek