github DataDog/dd-trace-py v4.4.0rc1
4.4.0rc1

latest releases: v4.3.0, v4.2.3
pre-release8 hours ago

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

New Features

  • LLM Observability
    • Adds support for class-based evaluators in LLM Observability. Users can now define custom evaluators by subclassing the BaseEvaluator class, providing more flexibility and structure for implementing evaluation logic. The EvaluatorContext stores the context of the evaluation, including the dataset record and span information. Additionally, class-based summary evaluators are supported via BaseSummaryEvaluator, which receives a SummaryEvaluatorContext containing aggregated inputs, outputs, expected outputs, and per-row evaluation results.

Bug Fixes

  • AAP
    • Fixes an issue where agent-based samplers could interfere with Standalone App and API Protection. In standalone mode, a trace need to be sent every minute to keep the service enabled, agent-based samplers with low sample rates could reject traces before the custom App and API Protection sampler was evaluated.
  • aws_lambda
    • This fix resolves an issue where user-defined SIGALRM handlers were not restored after TimeoutChannel cleanup, causing custom timeout handlers to stop working after the first Lambda invocation.
  • exception replay
    • fix a gevent support issue that could cause an exception when Exception Replay tries to figure out if a frame belongs to user code for capturing.
  • litellm
    • This fix resolves an issue where litellm>=1.74.15 wrapped router streaming responses in FallbackStreamWrapper (introduced for mid-stream fallback support) that caused an AttributeError when attempting to access the .handler attribute. The integration now gracefully handles both the original response format and wrapped responses by falling back to ddtrace's own stream wrapping when needed.
  • profiling
    • A bug where non-pushed samples could leak data to subsequent samples has been fixed.
    • A bug where asyncio task stacks could contain duplicated frames when the task was on-CPU is now fixed. The stack now correctly shows each frame only once.
    • The stack Profiler now correctly resets thread, task, and greenlet information after a fork, preventing stale data from the parent process from affecting profiling in child processes.
  • LLM Observability
    • This fix resolves an issue where the Pydantic AI integration was not properly tracing the StreamedRunResult.stream_responses() method which was introduced in pydantic-ai==0.8.1. This was leading to agent spans not being finished.

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

NewReleases is sending notifications on new releases.