v4.5.0rc4
📦 datadog-sdkView on GitHub →
✨ 12 features🐛 13 fixes⚡ 2 deprecations🔧 13 symbols
Summary
This release introduces significant new features for LLM Observability, including support for Claude Agent SDK tracing and new built-in evaluators. It also includes crucial bug fixes across profiling, tracing signal handling, and dependency injection.
Migration Steps
- Ensure Datadog agent version is 7.49.0 or above due to log probes using the debugger intake track.
- If using the pytest plugin, note that the new version is now default; use `DD_PYTEST_USE_NEW_PLUGIN=false` or `0` if you need to revert to the previous plugin version.
✨ New Features
- Profiling support added for applications using `uvloop` with `asyncio`.
- Tracing support added for pymongo 4.12+ AsyncMongoClient operations; both sync and async clients are automatically instrumented for pymongo >= 4.12.
- Code Security (IAST) now supports Python 3.14 template strings (PEP-750), tracking t-strings for taint propagation.
- Tracing support introduced for Claude Agent SDK methods: `query`, `ClaudeSDKClient.query`, and `ClaudeSDKClient.receive_messages`.
- OpenTelemetry support added for the `start_as_current_span` decorator on asynchronous functions (requires opentelemetry-api>=1.24).
- LLM Observability tracing support added for Claude Agent SDK requests.
- Azure OpenAI and Vertex AI added as supported providers for the LLM Judge evaluator.
- Introduction of `LLMObs.async_experiment()` for running experiments with async task functions and mixed sync/async evaluators.
- Built-in evaluators added for LLM evaluation tasks: `StringCheckEvaluator`, `RegexMatchEvaluator`, `LengthEvaluator`, `JSONEvaluator`, and `SemanticSimilarityEvaluator`.
- Support added for `json` metric type in evaluation metrics via `LLMObs.submit_evaluation()` or automatically when evaluators return `dict` values.
- Introduction of `LLMJudge` evaluator for automated LLM output evaluation using another LLM (supports OpenAI and Anthropic providers).
- AWS Bedrock added as a supported provider for the LLM Judge evaluator.
🐛 Bug Fixes
- The injected `site-packages` directory is now correctly added as the last entry in the `PYTHONPATH` environment variable.
- Fixed a race condition in the Profiler that could lead to out-of-bounds access.
- Fixed an infinite loop/memory exhaustion bug in the Stack Profiler when sampling `asyncio` Tasks.
- Fixed crashes in the memory profiler caused by re-entering the Python interpreter from inside CPython's allocator hook.
- Resolved an issue where the Stack Profiler held frame references to completed greenlets, delaying garbage collection of local variables.
- Fixed infinite recursion during stack unwinding on Python 3.11+ caused by corrupted or circular stack chunk linked lists.
- Resolved duplicate `"<N frame(s) omitted>"` entries and unbounded memory growth in the memory profiler caused by repeatedly exporting the same sample.
- Resolved an issue where ddtrace ignored the uwsgi `--skip-atexit` flag, causing profiler cleanup code to run during shutdown.
- Fixed an issue where traces might not be flushed during `SIGTERM` or `SIGINT` signal handling.
- Fixed an issue where telemetry events might not be flushed during `SIGTERM` or `SIGINT` signal handling.
- Fixed handling of closed logging streams in writer background threads.
- Added `noopener` and `noreferrer` link tags to the App and API Protection HTML blocking response template footer to mitigate potential reverse tabnabbing findings.
- Fixed an issue where malformed DSM payloads prevented data reporting when `DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED` was enabled.
Affected Symbols
aiohttp: `trace_app`asgi: `TraceMiddleware.__init__`bottle: `TracePlugin.__init__`cherrypy: `TraceMiddleware.__init__`falcon: `TraceMiddleware.__init__`flask_cache: `get_traced_cache`sqlalchemy: `trace_engine`wsgi: `WSGIMiddleware.__init__`Claude Agent SDK `query`ClaudeSDKClient.queryClaudeSDKClient.receive_messagesLLMObs.async_experimentLLMObs.submit_evaluation
⚡ Deprecations
- The environment variable DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED is deprecated and will be removed in version 5.0.0; 128-bit trace ID generation will become mandatory.
- The `tracer` parameter is deprecated in aiohttp: `trace_app`, asgi: `TraceMiddleware.__init__`, bottle: `TracePlugin.__init__`, cherrypy: `TraceMiddleware.__init__`, falcon: `TraceMiddleware.__init__`, flask_cache: `get_traced_cache`, sqlalchemy: `trace_engine`, and wsgi: `WSGIMiddleware.__init__`. The `ddtrace.trace.tracer` singleton is always used instead.