rocket_prometheus icon indicating copy to clipboard operation
rocket_prometheus copied to clipboard

Is there a way to exclude /metrics from the reporting

Open gemcoder21 opened this issue 1 year ago • 1 comments

Is there a way to exclude specific routes like metrics to exclude from the prometheus stats?

gemcoder21 avatar Aug 05 '23 19:08 gemcoder21

Not currently, no. I'd accept a PR to add a method to PrometheusMetrics to include/exclude routes, possibly based on a closure accepting a Request? It would probably require us to Box the closure which adds an allocation and pointer chase, but that's unlikely to be a huge issue.

sd2k avatar Aug 24 '23 14:08 sd2k