mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
The componentized images exec uvicorn directly, so ddtrace-run never wraps the interpreter. USE_DDTRACE is not inert there; the proxy lifespan still runs patch_all and litellm's own manual spans still emit. What never gets installed is ddtrace's ASGI TraceMiddleware: starlette builds its middleware stack lazily on the first __call__, which is the lifespan scope, so patching from inside the lifespan body is already too late and no root request span is ever created. Route both entrypoints through a shared docker/component_entrypoint.sh that mirrors the monolith's prod_entrypoint.sh contract, including the DD_TRACE_OPENAI_ENABLED=False export that keeps ddtrace's openai integration from double-reporting calls litellm instruments itself. Co-authored-by: Yassin Kortam <yassin.kortam@gmail.com>
8 lines
131 B
Bash
Executable file
8 lines
131 B
Bash
Executable file
#!/bin/sh
|
|
|
|
if [ "$USE_DDTRACE" = "true" ]; then
|
|
export DD_TRACE_OPENAI_ENABLED="False"
|
|
exec ddtrace-run "$@"
|
|
fi
|
|
|
|
exec "$@"
|