mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
fix(prometheus.py): always initialize label_filters for PrometheusLogger (#11764)
This commit is contained in:
parent
06519e3f03
commit
6d373876d2
1 changed files with 3 additions and 3 deletions
|
|
@ -41,6 +41,9 @@ class PrometheusLogger(CustomLogger):
|
|||
|
||||
from litellm.proxy.proxy_server import CommonProxyErrors, premium_user
|
||||
|
||||
# Always initialize label_filters, even for non-premium users
|
||||
self.label_filters = self._parse_prometheus_config()
|
||||
|
||||
if premium_user is not True:
|
||||
verbose_logger.warning(
|
||||
f"🚨🚨🚨 Prometheus Metrics is on LiteLLM Enterprise\n🚨 {CommonProxyErrors.not_premium_user.value}"
|
||||
|
|
@ -51,9 +54,6 @@ class PrometheusLogger(CustomLogger):
|
|||
)
|
||||
return
|
||||
|
||||
# Parse prometheus metrics configuration for label filtering
|
||||
self.label_filters = self._parse_prometheus_config()
|
||||
|
||||
# Create metric factory functions
|
||||
self._counter_factory = self._create_metric_factory(Counter)
|
||||
self._gauge_factory = self._create_metric_factory(Gauge)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue