stephenhillier / starlette_exporter

Prometheus exporter for Starlette and FastAPI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notice: group_paths and filter_unhandled_paths will both default to True

stephenhillier opened this issue · comments

The default values for group_paths and filter_unhandled_paths will be changing from False to True. Most users will already want to set these both to True, but when these options were added they defaulted to False to avoid changes to existing behavior. See #78

The changes will be made on or after Nov 17, 2023 (a week from now). A deprecation notice is now part of v0.17.0.

Feedback welcome!

For the lazy who are here thanks to your deprecation text:

Change this: app.add_middleware(PrometheusMiddleware, app_name='foo')

to this: app.add_middleware(PrometheusMiddleware, group_paths=True, filter_unhandled_paths=True, app_name='foo')

Defaults for group_paths and filter_unhandled_paths changed in v0.18.0