From 2a54be4a43c9cb320ad98b67806de9a16bf21745 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 10 Aug 2024 13:57:25 -0700 Subject: [PATCH] feat - log fallbacks events on prometheus --- litellm/router_utils/fallback_event_handlers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/litellm/router_utils/fallback_event_handlers.py b/litellm/router_utils/fallback_event_handlers.py index bd9941d07b..98d9cd92de 100644 --- a/litellm/router_utils/fallback_event_handlers.py +++ b/litellm/router_utils/fallback_event_handlers.py @@ -9,7 +9,9 @@ async def log_success_fallback_event(original_model_group: str, kwargs: dict): for _callback in litellm.callbacks: if isinstance(_callback, CustomLogger): try: - await _callback.log_success_fallback_event() + await _callback.log_success_fallback_event( + original_model_group=original_model_group, kwargs=kwargs + ) except Exception as e: verbose_router_logger.error( f"Error in log_success_fallback_event: {(str(e))}" @@ -21,7 +23,9 @@ async def log_failure_fallback_event(original_model_group: str, kwargs: dict): for _callback in litellm.callbacks: if isinstance(_callback, CustomLogger): try: - await _callback.log_failure_fallback_event() + await _callback.log_failure_fallback_event( + original_model_group=original_model_group, kwargs=kwargs + ) except Exception as e: verbose_router_logger.error( f"Error in log_failure_fallback_event: {(str(e))}"