Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

(proxy prometheus) track api key and team in latency metrics (#5966)

Ishaan Jaff7e69cdd1b44d
diff --git a/litellm/integrations/prometheus.py b/litellm/integrations/prometheus.py
index c9b9e2528da..13e5b439c70 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",