mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
allow setting outage metrics
This commit is contained in:
parent
9a8fa9f047
commit
99ecde7744
1 changed files with 16 additions and 0 deletions
|
@ -315,6 +315,22 @@ class PrometheusLogger:
|
|||
except:
|
||||
pass
|
||||
|
||||
def set_llm_outage_metric(
|
||||
self,
|
||||
litellm_model_name: str,
|
||||
model_id: str,
|
||||
api_base: str,
|
||||
llm_provider: str,
|
||||
):
|
||||
"""
|
||||
log these labels
|
||||
["litellm_model_name", "model_id", "api_base", "api_provider"]
|
||||
"""
|
||||
self.deployment_unhealthy.labels(
|
||||
litellm_model_name, model_id, api_base, llm_provider
|
||||
).set(1)
|
||||
pass
|
||||
|
||||
def set_llm_deployment_success_metrics(self, request_kwargs: dict):
|
||||
try:
|
||||
verbose_logger.debug("setting remaining tokens requests metric")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue