Change8

v4.5.0rc2

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

Summary

This release introduces significant new features for LLM Observability evaluators and IAST support for Python 3.14 template strings, alongside numerous bug fixes in profiling and tracing signal handling. Several parameters related to tracer injection are deprecated in preparation for version 5.0.0.

Migration Steps

  1. Ensure Datadog agent version is 7.49.0 or above due to changes in log probe intake track.
  2. Remove usage of the `tracer` parameter in deprecated functions/methods (e.g., `trace_app`, `TraceMiddleware.__init__`, etc.) and rely on the default `ddtrace.trace.tracer` singleton.

✨ New Features

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

🐛 Bug Fixes

  • The injected `site-packages` directory is now added as the last entry in the `PYTHONPATH` environment variable.
  • 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 on Python 3.11+ where corrupted or circular stack chunk linked lists 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 duplicate entries and unbounded memory growth in the memory profiler.
  • Fixed an issue where ddtrace ignored the uwsgi `--skip-atexit` flag and registered Python atexit handlers, 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 `noopener` and `noreferrer` link tags to the Datadog link in the App and API Protection HTML blocking response template footer 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 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.