Skip to content

[Bug]: Traceparent header not forwarded for embedding request #14670

@PiePra

Description

@PiePra

What happened?

Can't get litellm to forward the traceparent header right now. Tracing in general is working as I can see litellm traces in my grafana tempo. I am using non root Image and Version ghcr.io/berriai/litellm-non_root:main-v1.75.8-stable

I used

litellm_settings:
  forward_traceparent_to_llm_provider: True

and

OTEL_ENDPOINT=http://tempo.monitoring.svc.cluster.local:4318/v1/traces
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf

in my yaml config.

When sending requests with traceparent the header is not propagated:

curl -X POST http://litellm:4000/v1/embeddings   -H "Authorization: Bearer ****"   -H "Content-Type: application/json"  -H "traceparent: 00-80e1afed08e019fc1110464cfa66635c-02e80198930058d4-01"   -d '{
        "model": "jina-embeddings",
        "input": ["hello"]
      }'

Request received in litellm:

User-Agent: curl/8.5.0
Accept: */*
Authorization: Bearer *****
Content-Type: application/json
traceparent: 00-80e1afed08e019fc1110464cfa66635c-02e80198930058d4-01
Content-Length: 72

{
        "model": "jina-embeddings",
        "input": ["hello"]
      }

and the request received in triton:

accept: */*
accept-encoding: gzip, deflate
Connection: keep-alive
user-agent: litellm/1.75.8
content-length: 82
content-type: application/json

{"inputs":[{"name":"input_text","shape":[1],"datatype":"BYTES","data":["hello"]}]}

Relevant log output

Are you a ML Ops Team?

Yes

What LiteLLM version are you on ?

v1.75.8

Twitter / LinkedIn details

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions