Change8

v4.5.0

📦 datadog-sdkView on GitHub →
12 features🐛 13 fixes2 deprecations🔧 15 symbols

Summary

This release introduces significant new features for LLM Observability, including built-in evaluators and expanded provider support for LLM Judge. It also deprecates the explicit `tracer` parameter across several integrations in preparation for version 5.0.0.

Migration Steps

  1. If using dynamic instrumentation, ensure Datadog Agent version is 7.49.0 or above due to log probes now using the debugger intake track.
  2. If you were relying on the beta pytest plugin via `DD_PYTEST_USE_NEW_PLUGIN=true` (or similar), remove that environment variable as the new plugin is now the default.
  3. If you need to revert to the previous pytest plugin version, set the `DD_PYTEST_USE_NEW_PLUGIN` environment variable to `false` or `0`.

✨ 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 when using pymongo >= 4.12.
  • Code Security (IAST) now supports tracing taint propagation for Python 3.14 template strings (PEP-750).
  • Tracing support introduced for Claude Agent SDK methods: `query`, `ClaudeSDKClient.query`, and `ClaudeSDKClient.receive_messages`.
  • OpenTelemetry: Added support for the `start_as_current_span` decorator on asynchronous functions (requires opentelemetry-api>=1.24).
  • LLM Observability: Added tracing support for Claude Agent SDK requests.
  • LLM Observability: Azure OpenAI and Vertex AI added as supported providers for the LLM Judge evaluator.
  • LLM Observability: Introduced the `LLMObs.async_experiment()` method for running experiments with async task functions and mixed sync/async evaluators.
  • LLM Observability: Added built-in evaluators: `StringCheckEvaluator`, `RegexMatchEvaluator`, `LengthEvaluator`, `JSONEvaluator`, and `SemanticSimilarityEvaluator`.
  • LLM Observability: Added support for `json` metric type in evaluation metrics via `LLMObs.submit_evaluation()` or automatically when evaluators return `dict` values.
  • LLM Observability: Added `LLMJudge` evaluator for automated LLM output evaluation using another LLM (supports OpenAI and Anthropic providers).
  • LLM Observability: 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 issue where the Stack Profiler could loop infinitely (causing memory exhaustion/crashes) 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 could hold frame references to completed greenlets, delaying garbage collection of local variables.
  • Fixed a bug where corrupted or circular stack chunk linked lists on Python 3.11+ caused infinite recursion during stack unwinding.
  • Resolved an issue where the dropped frames indicator frame could be added multiple times during repeated sample export, preventing unbounded memory growth in the memory profiler.
  • Resolved an issue where ddtrace ignored the uwsgi `--skip-atexit` flag, causing profiler cleanup code to run during shutdown and leading to crashes/hangs in uwsgi workers.
  • Resolved an issue where traces may not be flushed during `SIGTERM` or `SIGINT` signal handling.
  • Resolved an issue where telemetry events may 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 link to mitigate potential "reverse tabnabbing" vulnerabilities.
  • Resolved an issue where malformed DSM payloads prevented data reporting when `DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED` was enabled.

Affected Symbols

⚡ 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 several integration functions/methods (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__`) and will be removed in version 5.0.0, as the `ddtrace.trace.tracer` singleton is always used.