(Observability) - Add more detailed dd tracing on Proxy Auth, Bedrock Auth (#8693)

* add dd tracer

* fix dd tracing

* add @tracer.wrap() on def user_api_key_auth

* add async_function_with_retries

* remove dead code

* add tracer.wrap on base aws llm

* add tracer.wrap on base aws llm

* fix print verbose

* fix dd tracing

* trace base aws llm

* fix test base aws llm

* fix converse transform

* test base aws llm

* BASE_AWS_LLM_PATH

* BASE_AWS_LLM_PATH

* test dd tracing
This commit is contained in:
Ishaan Jaff 2025-02-20 18:00:41 -08:00 committed by GitHub
parent ccfbb77b73
commit 300d7825f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 256 additions and 42 deletions

View file

@ -48,6 +48,7 @@ from litellm.caching.caching import DualCache, InMemoryCache, RedisCache
from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.asyncify import run_async_function
from litellm.litellm_core_utils.core_helpers import _get_parent_otel_span_from_kwargs
from litellm.litellm_core_utils.dd_tracing import tracer
from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLogging
from litellm.router_strategy.budget_limiter import RouterBudgetLimiting
from litellm.router_strategy.least_busy import LeastBusyLoggingHandler
@ -2857,6 +2858,7 @@ class Router:
#### [END] ASSISTANTS API ####
@tracer.wrap()
async def async_function_with_fallbacks(self, *args, **kwargs): # noqa: PLR0915
"""
Try calling the function_with_retries
@ -3127,6 +3129,7 @@ class Router:
Context_Policy_Fallbacks={content_policy_fallbacks}",
)
@tracer.wrap()
async def async_function_with_retries(self, *args, **kwargs): # noqa: PLR0915
verbose_router_logger.debug("Inside async function with retries.")
original_function = kwargs.pop("original_function")