pypi ddtrace 4.5.0rc2

8 hours ago

Estimated end-of-life date, accurate to within three months: 05-2027
See the support level definitions for more information.

Upgrade Notes

  • dynamic instrumentation
    • log probes now use the debugger intake track. This requires Datadog agent version 7.49.0 or above.

Deprecation Notes

  • tracing

    • 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 and class 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.

New Features

  • profiling
    • It is now possible to profile applications using uvloop with asyncio.
  • pymongo
    • Adds support for tracing pymongo 4.12+ AsyncMongoClient operations. The integration now automatically instruments both synchronous and asynchronous clients when using pymongo >= 4.12.
  • Code Security (IAST)
    • This introduces support for Python 3.14 template strings (PEP-750). Template strings (t-strings) are now tracked for taint propagation, enabling detection of security vulnerabilities when user input is embedded in template strings.
  • LLM Observability
    • Adds built-in evaluators for common evaluation tasks. The following evaluators are now available:
      • StringCheckEvaluator: Performs string comparison operations (equals, not equals, contains, case-insensitive contains).
      • RegexMatchEvaluator: Validates output against regex patterns with search, match, or fullmatch modes.
      • LengthEvaluator: Validates output length constraints by characters, words, or lines.
      • JSONEvaluator: Validates JSON syntax and optionally checks for required keys.
      • SemanticSimilarityEvaluator: Measures semantic similarity between output and expected output using embedding vectors.
    • Adds support for json metric type in evaluation metrics. Users can now submit dict values as evaluation metrics using LLMObs.submit_evaluation() with metric_type="json". Additionally, experiment evaluators that return dict values are automatically detected as json metric type.
    • Adds LLMJudge evaluator for automated evaluation of LLM outputs using another LLM as the judge. Supports OpenAI and Anthropic providers with boolean, score, categorical, and custom JSON schema output formats.
    • Adds AWS Bedrock as a supported provider for the LLM Judge evaluator.

Bug Fixes

  • lib injection
    • the injected site-packages directory is now added as the last entry in the PYTHONPATH environment variable (it previously was added before the last entry).
  • profiling
    • Fixes crashes in the memory profiler caused by re-entering the Python interpreter from inside CPython's allocator hook.
    • This fix resolves an issue where stack profiler could hold frame references to greenlets, which could have already completed. This could delay garbage collecting local variables from the greenlet.
    • A bug where corrupted or circular stack chunk linked lists on Python 3.11+ could cause infinite recursion during stack unwinding was fixed.
    • This fix resolves an issue where the dropped frames indicator frame could be added multiple times when exporting the same sample repeatedly, resulting in duplicate "<N frame(s) omitted>" entries in profiling data and unbounded memory growth in the memory profiler.
  • internal
    • This fix resolves an issue where ddtrace ignored the uwsgi --skip-atexit flag and registered Python atexit handlers regardless. This caused profiler cleanup code to run during process shutdown even when --skip-atexit was set, leading to crashes and hangs in uwsgi workers.
  • tracing
    • This fix resolves an issue where traces may not be flushed during the handling of SIGTERM or SIGINT signals.
  • telemetry
    • This fix resolves an issue where telemetry events may not be flushed during the handling of SIGTERM or SIGINT signals.
    • handle closed logging streams in writer background threads
  • AAP
    • Add the noopener and noreferrer link tags in the Datadog link in the footer of the App and API Protection HTML blocking response template.
      This could previously trigger a "reverse tabnabbing" vulnerability finding from other security analysis tools.
  • DSM
    • This fix resolves an issue where malformed DSM payloads prevented data from being reported when DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED was enabled.

Don't miss a new ddtrace release

NewReleases is sending notifications on new releases.