django-prometheus
django-prometheus copied to clipboard
Exclude metrics by view (or other criteria)
Hi all, is there any way to exclude request/response metrics by a certain view or by a certain criteria? The use case is that I'm seeing a lot of the django_http_responses_total_by_status_view_method_total metric with prometheus-django-metrics as the view (so, any queries to the metrics endpoint). Is there a clean way to exclude metrics about this route? Just looking to reduce the amount of metrics we expose by default.
Would also be interested in this to do the same and also exclude liveness and readiness probes.
Same here, and I'd be happy to contribute this feature if it's considered a valid addition.