diff --git a/litestar/contrib/prometheus/config.py b/litestar/contrib/prometheus/config.py index b77dab0ecb..82122d38a0 100644 --- a/litestar/contrib/prometheus/config.py +++ b/litestar/contrib/prometheus/config.py @@ -50,6 +50,9 @@ class PrometheusConfig: middleware_class: type[PrometheusMiddleware] = field(default=PrometheusMiddleware) """The middleware class to use. """ + group_path: bool = field(default=False) + """Whether to group paths in the metrics ot avoid cardinality explosion. + """ @property def middleware(self) -> DefineMiddleware: