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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
[Proxy] Litellm add DB metrics to prometheus (#13626)
Jugal D. Bhatt40550e5b8806
diff --git a/litellm/types/integrations/prometheus.py b/litellm/types/integrations/prometheus.pyindex 839c1048c3d..e0ee950d260 100644--- a/litellm/types/integrations/prometheus.py+++ b/litellm/types/integrations/prometheus.py@@ -176,6 +176,11 @@ DEFINED_PROMETHEUS_METRICS = Literal["litellm_deployment_failure_responses","litellm_deployment_total_requests","litellm_deployment_success_responses",+ "litellm_pod_lock_manager_size",+ "litellm_in_memory_daily_spend_update_queue_size",+ "litellm_redis_daily_spend_update_queue_size",+ "litellm_in_memory_spend_update_queue_size",+ "litellm_redis_spend_update_queue_size",]@@ -378,6 +383,17 @@ class PrometheusMetricLabels:litellm_deployment_success_responses = litellm_deployment_total_requests+ # Buffer monitoring metrics - these typically don't need additional labels+ litellm_pod_lock_manager_size: List[str] = []++ litellm_in_memory_daily_spend_update_queue_size: List[str] = []++ litellm_redis_daily_spend_update_queue_size: List[str] = []++ litellm_in_memory_spend_update_queue_size: List[str] = []++ litellm_redis_spend_update_queue_size: List[str] = []+@staticmethoddef get_labels(label_name: DEFINED_PROMETHEUS_METRICS) -> List[str]:default_labels = getattr(PrometheusMetricLabels, label_name)