From 259a73dcb470893fbd118bfdae1d56a862f166dc Mon Sep 17 00:00:00 2001 From: evstrat Date: Tue, 28 May 2024 16:58:27 +0300 Subject: [PATCH] add group_path param to config --- litestar/contrib/prometheus/config.py | 3 +++ 1 file changed, 3 insertions(+) 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: