stephenhillier / starlette_exporter

Prometheus exporter for Starlette and FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: ignoring paths not mapped in the app (`filter_unhandled_paths`)

mwek opened this issue · comments

Hey! I would like to add a feature to filter out paths that are not mapped by the application. Currently, a malicious actor could DoS the underlying Prometheus DB by generating multiple requests that will result in a 404.

My suggestion for the parameter name is filter_unhandled_paths -- this will make the starlette_exporter API-level compatible with starlette-prometheus.