(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
This commit is contained in:
Ishaan Jaff 2024-09-28 19:04:42 -07:00 committed by GitHub
parent 49ec40b1cb
commit 7e69cdd1b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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",