This release grants the option to ignore unhandled paths. Use this option to prevent 404 errors from filling up the metrics. See 14.
From README:
`filter_unhandled_paths`: setting this to `True` will cause the middleware to ignore requests with unhandled paths (in other words, 404 errors). This helps prevent filling up the metrics with 404 errors and/or intentially bad requests. Default is `False`.
example:
python
app.add_middleware(PrometheusMiddleware,
filter_unhandled_paths=True, group_paths=True)
Thank you to mwek for contributing this feature (15).