[Feat] Add proxy level prometheus metrics (#5789)

* add Proxy Level Tracking Metrics doc

* update service logger

* prometheus - track litellm_proxy_failed_requests_metric

* use REQUESTED_MODEL

* fix prom request_data
This commit is contained in:
Ishaan Jaff 2024-09-19 17:13:07 -07:00 committed by GitHub
parent ae41c0df82
commit 91e58d9049
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 166 additions and 18 deletions

View file

@ -632,9 +632,9 @@ class ProxyLogging:
async def post_call_failure_hook(
self,
request_data: dict,
original_exception: Exception,
user_api_key_dict: UserAPIKeyAuth,
request_data: dict,
):
"""
Allows users to raise custom exceptions/log when a call fails, without having to deal with parsing Request body.
@ -750,6 +750,7 @@ class ProxyLogging:
_callback = callback # type: ignore
if _callback is not None and isinstance(_callback, CustomLogger):
await _callback.async_post_call_failure_hook(
request_data=request_data,
user_api_key_dict=user_api_key_dict,
original_exception=original_exception,
)