From d8d78bfb4fe8d77d18b4fabdc84dcd79bb0700b5 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Thu, 18 Apr 2024 12:30:44 -0700 Subject: [PATCH] fix(prometheus.py): fix metric name to be more accurate change metric name from litellm_failed_requests_metric to litellm_llm_api_failed_requests_metric --- litellm/integrations/prometheus.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index 933869a58..7943d5dba 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -22,9 +22,9 @@ class PrometheusLogger: verbose_logger.debug(f"in init prometheus metrics") from prometheus_client import Counter - self.litellm_failed_requests_metric = Counter( - name="litellm_failed_requests_metric", - documentation="Total number of failed LLM calls to litellm", + self.litellm_llm_api_failed_requests_metric = Counter( + name="litellm_llm_api_failed_requests_metric", + documentation="Total number of failed LLM API calls via litellm", labelnames=["end_user", "hashed_api_key", "model", "team"], ) @@ -105,7 +105,7 @@ class PrometheusLogger: ### FAILURE INCREMENT ### if "exception" in kwargs: - self.litellm_failed_requests_metric.labels( + self.litellm_llm_api_failed_requests_metric.labels( end_user_id, user_api_key, model, user_api_team ).inc() except Exception as e: