Change8

v4.5.0rc1

📦 datadog-sdkView on GitHub →
5 features🐛 8 fixes2 deprecations🔧 11 symbols

Summary

This release introduces significant new features for LLM Observability, IAST support for Python 3.14 template strings, and pymongo 4.12+ tracing. It also deprecates several parameters in tracing integrations in favor of the default tracer singleton and includes numerous bug fixes across profiling and tracing components.

Migration Steps

  1. If using dynamic instrumentation, ensure Datadog agent version 7.49.0 or above is running.
  2. Remove usage of the 'tracer' parameter from 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 default tracer singleton will be used.
  3. If relying on the DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED environment variable, prepare for its removal in v5.0.0 by ensuring 128-bit trace ID generation is the default or explicitly enabled if necessary.

✨ New Features

  • Added support for tracing pymongo 4.12+ AsyncMongoClient operations, automatically instrumenting both synchronous and asynchronous clients.
  • 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.submit_evaluation(), allowing submission of dict values.
  • Added LLMJudge evaluator for automated LLM output evaluation using another LLM (OpenAI/Anthropic) as the judge, supporting various output formats.

🐛 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 infinite recursion during stack unwinding on Python 3.11+ caused by corrupted or circular stack chunk linked lists.
  • 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, causing profiler cleanup code to run during shutdown when it should have been skipped.
  • Resolved an issue where traces might not be flushed during the handling of SIGTERM or SIGINT signals.
  • Fixed handling of closed logging streams in writer background threads for Telemetry.

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.