Change8

v4.5.0rc3

📦 datadog-sdkView on GitHub →
7 features🐛 12 fixes2 deprecations🔧 11 symbols

Summary

This release introduces significant new features for LLM Observability, including advanced evaluators and Judge capabilities, alongside support for Python 3.14 template strings in IAST. It also addresses numerous stability issues across profiling, tracing, and internal components, while deprecating the explicit `tracer` parameter in several integrations.

Migration Steps

  1. Ensure Datadog agent version is 7.49.0 or above due to changes in log probe intake track for dynamic instrumentation.

✨ New Features

  • Added support for profiling applications using `uvloop` with `asyncio`.
  • Added support for tracing pymongo 4.12+ AsyncMongoClient operations; integration now automatically instruments both synchronous and asynchronous clients when using pymongo >= 4.12.
  • Introduced support for Python 3.14 template strings (PEP-750) in Code Security (IAST), enabling tracking of template strings (t-strings) for taint propagation.
  • Added built-in evaluators for LLM Observability: `StringCheckEvaluator`, `RegexMatchEvaluator`, `LengthEvaluator`, `JSONEvaluator`, and `SemanticSimilarityEvaluator`.
  • Added support for `json` metric type in LLM evaluation metrics, allowing submission of `dict` values via `LLMObs.submit_evaluation()` or automatic detection from experiment evaluators.
  • Added `LLMJudge` evaluator for automated LLM output evaluation using another LLM as the judge, supporting OpenAI and Anthropic providers with various output formats.
  • Added AWS Bedrock as a supported provider for the `LLMJudge` evaluator.

🐛 Bug Fixes

  • The injected `site-packages` directory is now added as the last entry in the `PYTHONPATH` environment variable.
  • Fixed an issue where the Stack Profiler could loop infinitely (causing crashes due to memory allocation) 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+ could cause infinite recursion during stack unwinding.
  • Resolved an issue where the dropped frames indicator frame could be added multiple times when exporting the same sample repeatedly, preventing duplicate entries and unbounded memory growth in the memory profiler.
  • Resolved an issue where ddtrace ignored the uwsgi `--skip-atexit` flag and registered Python atexit handlers regardless, causing profiler cleanup code to run during shutdown when it should have been skipped.
  • Resolved an issue where traces may not be flushed during the handling of `SIGTERM` or `SIGINT` signals.
  • Resolved an issue where telemetry events may not be flushed during the handling of `SIGTERM` or `SIGINT` signals.
  • Fixed handling of closed logging streams in writer background threads.
  • Added the `noopener` and `noreferrer` link tags in the Datadog link in the App and API Protection HTML blocking response template footer to mitigate potential reverse tabnabbing findings.
  • 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 the following functions/methods and will be removed in version 5.0.0: 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__`. The `ddtrace.trace.tracer` singleton is always used instead.