github DataDog/dd-trace-py v4.10.6
4.10.6

latest releases: v4.9.4, v4.11.0rc6
6 hours ago

Bug Fixes

  • tracing: Resolves an issue where wrapping an async generator on Python 3.11 through 3.14 raises a TypeError: object NoneType can't be used in 'await' expression error. This occurs when the generator body awaits a coroutine that suspends to the event loop before its first yield. Python 3.9 and 3.10 are not affected.
  • LLM Observability: Resolves an issue in the openai integration where streamed chat completion spans under-reported output_tokens and total_tokens for OpenAI-compatible providers that emit a cumulative usage object on every streamed chunk.
  • tracing: Applying @tracer.wrap() to an async generator now forwards sent values, thrown exceptions, and close requests to the underlying generator, so it behaves like the unwrapped generator in all cases. Previously the wrapper only relayed values during forward iteration, so sent values were dropped and try/finally cleanup was skipped whenever the generator was closed early or received a thrown exception.
  • core: This fix prevents periodic thread restarts from blocking application code from resuming in forked children.
  • tracing: A rare crash happening on versions of CPython prior to 3.12 has been fixed.

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

NewReleases is sending notifications on new releases.