build(deps): move ddtrace to the 4.x line

`ddtrace.tracer` was removed in the 4.x line, so the TYPE_CHECKING import is
retargeted at `ddtrace.trace.Tracer`. The `docker/build_from_pip` image pinned
ddtrace==2.19.0 independently of the lock; that pin is moved to the version the
lock now resolves.

Verified against the installed 4.12.2: `ddtrace.trace.Tracer`,
`ddtrace.patch_all` (proxy_server startup) and `ddtrace.profiling.Profiler`
(proxy_server profiling) all resolve.

Code companion for the ddtrace floor raise in the accompanying dependency
commit; the import lives under TYPE_CHECKING so this commit is inert at runtime
on either line.
This commit is contained in:
Yuneng Jiang 2026-08-08 12:21:19 -07:00
parent 49995ba9ce
commit aeea662859
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -36,7 +36,7 @@ RUN uv venv --python python && \
"opentelemetry-api==1.28.0" \
"opentelemetry-sdk==1.28.0" \
"opentelemetry-exporter-otlp==1.28.0" \
"ddtrace==2.19.0" \
"ddtrace==4.12.2" \
"sentry-sdk==2.21.0" \
"mangum==0.17.0" \
"azure-ai-contentsafety==1.0.0" \

View file

@ -10,7 +10,7 @@ from typing import TYPE_CHECKING, Any, Optional, Union
from litellm.secret_managers.main import get_secret_bool
if TYPE_CHECKING:
from ddtrace.tracer import Tracer as DD_TRACER
from ddtrace.trace import Tracer as DD_TRACER
else:
DD_TRACER = Any