mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix pre call utils adding extra headers
This commit is contained in:
parent
7bedb5ca52
commit
413877d1c6
1 changed files with 6 additions and 0 deletions
|
@ -175,8 +175,14 @@ 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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue