mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +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:
|
except:
|
||||||
pass
|
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):
|
def set_llm_deployment_success_metrics(self, request_kwargs: dict):
|
||||||
try:
|
try:
|
||||||
verbose_logger.debug("setting remaining tokens requests metric")
|
verbose_logger.debug("setting remaining tokens requests metric")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue