From 7e69cdd1b44d1edf4af3b6569d190f0e8acf987e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 28 Sep 2024 19:04:42 -0700 Subject: [PATCH] (proxy prometheus) track api key and team in latency metrics (#5966) * track api key and team in prom latency metric * add test for latency metric * test prometheus success metrics for latency --- litellm/integrations/prometheus.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py index c9b9e2528..13e5b439c 100644 --- a/litellm/integrations/prometheus.py +++ b/litellm/integrations/prometheus.py @@ -264,6 +264,12 @@ class PrometheusLogger(CustomLogger): ) # Deployment Latency tracking + team_and_key_labels = [ + "hashed_api_key", + "api_key_alias", + "team", + "team_alias", + ] self.litellm_deployment_latency_per_output_token = Histogram( name="litellm_deployment_latency_per_output_token", documentation="LLM Deployment Analytics - Latency per output token",