github DataDog/dd-trace-py v4.3.0rc1
4.3.0rc1

pre-release5 hours ago

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

Upgrade Notes

  • httpx
    • This upgrades the minimum supported version of the httpx library from 0.17.1 to 0.25.0. If you are using httpx versions prior to 0.25.0, upgrade to httpx>=0.25.0 to ensure compatibility with ddtrace.

Deprecation Notes

  • tracing
    • Tracer.data_streams_processor is deprecated and will be removed in v5.0.0. Use ddtrace.data_streams.data_streams_processor() instead.

New Features

  • profiling
    • Add support for threading.Condition locking type profiling in Python. The Lock profiler now provides visibility into threading.Condition usage, helping identify contention in multi-threaded applications using condition variables.
    • The profiler now supports tracking parent-child relationships between asyncio tasks. This will result in better stacks in flame graphs.
  • AAP
    • Add SSRF exploit prevention and OWASP API top 10 security risks analysis for the httpx client.
  • asgi
    • WebSocket instrumentation is now enabled by default, automatically capturing traces for WebSocket connections without requiring additional configuration.
  • LLM Observability
    • Adds EvaluatorResult class that evaluator functions can return to provide additional fields beyond just the evaluation value. This enables evaluators to include reasoning, assessment, metadata, and tags alongside the evaluation result.
  • lib-injection
    • Enable lib-injection on Python 3.14.

Bug Fixes

  • AAP
    • This fix resolves an issue where some downstream request analysis rules were not matched because HTTP header names were compared case-sensitively; header names are now normalized so rules match correctly.
  • exception replay
    • avoid RuntimeError caused by capturing the __dict__ attribute of an object that mutates during iteration.
  • LLM Observability
    • fix AWS Bedrock unexpected list type.
    • Resolves an issue where the langchain integration incorrectly marked openai responses as duplicate LLM spans even if there was a downstream LLM span generated by the openai integration.
  • internal
    • This fix resolves an issue where a race condition during PeriodicThread shutdown caused random crashes on Python 3.14+ during application finalization.
  • tracer
    • Removes wrap executor and context provider after tracer shutdown.
    • django
      • fixes an issue where Django user IDs did not get added as a span tag if they were UUID formatted.
  • profiling
    • A bug that would cause the process to temporarily hang upon fork in very rare cases has been fixed.
    • Fixes a PicklingError when using multiprocessing.Manager() with lock profiling enabled on Python 3.14+. Python 3.14 changed the default multiprocessing start method from fork to forkserver, which requires all objects to be pickleable. The lock profiler's wrappers now properly support pickle serialization.
    • This fix resolves an issue where stack profiler could loop infinitely while holding a lock. This could have led to stopping greenlets from starting and/or exiting.
    • This fix resolves an issue where the stack profiler could loop infinitely when iterating through Python interpreter states. This could have occurred if the interpreter linked list became corrupted or contained a cycle, potentially causing the profiler to hang. The fix adds both cycle detection and an iteration limit (256 interpreters) to prevent unbounded loops.
    • This fix resolves an issue where memory profiler flamegraphs were upside down.
    • An issue where a duplicate key in a cache could lead to inconsistent profiles has been fixed.
  • pylibmc
    • Fixes an issue where initializing a TracedClient without a tracer disables tracing. The global tracer is now used when tracer=None.

Other Changes

  • profiling
    • A redundant syscall per thread during stack sampling was eliminated by caching the thread running state when updating CPU time, reducing syscall overhead from 3 to 2 calls per thread on Linux.

Don't miss a new dd-trace-py release

NewReleases is sending notifications on new releases.