mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
[Proxy] Litellm add DB metrics to prometheus (#13626)
* Fix - add safe divide by 0 for most places to prevent crash
* feat(prometheus): add new metrics for monitoring pod lock manager and spend update queues
* fix(prometheus): specify type for buffer monitoring metrics in PrometheusMetricLabels
* Revert "Fix - add safe divide by 0 for most places to prevent crash"
This reverts commit 265d40e390.
This commit is contained in:
parent
ab8bd70c5e
commit
40550e5b88
1 changed files with 16 additions and 0 deletions
|
|
@ -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] = []
|
||||
|
||||
@staticmethod
|
||||
def get_labels(label_name: DEFINED_PROMETHEUS_METRICS) -> List[str]:
|
||||
default_labels = getattr(PrometheusMetricLabels, label_name)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue