Merge branch 'main' into litellm_fix_in_mem_usage

This commit is contained in:
Ishaan Jaff 2024-06-27 21:12:06 -07:00 committed by GitHub
commit 3bcf9dd9fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 267 additions and 89 deletions

View file

@ -175,8 +175,13 @@ async def add_litellm_data_to_request(
def _add_otel_traceparent_to_data(data: dict, request: Request):
from litellm.proxy.proxy_server import open_telemetry_logger
if data is None:
return
if open_telemetry_logger is None:
# if user is not use OTEL don't send extra_headers
# relevant issue: https://github.com/BerriAI/litellm/issues/4448
return
if request.headers:
if "traceparent" in request.headers:
# we want to forward this to the LLM Provider