Change8

v3.10.0rc2

📦 datadog-sdk
4 features🐛 8 fixes1 deprecations🔧 6 symbols

Summary

This release introduces tracing support for Google GenAI and Azure Service Bus, alongside several bug fixes for tracing generators, logging context, and dynamic instrumentation. Deprecation warnings have been issued for arguments in `record_exception`.

✨ New Features

  • LLMObs: Introduced tracing support for Google's Generative AI SDK for Python's `generate_content` and `generate_content_stream` methods via `google_genai` integration.
  • Tracing: Added support for Azure Service Bus producers via the `azure_servicebus` integration.
  • Tracing: Added distributed tracing support for Service Bus triggers in Azure Functions via the `azure_functions` integration.
  • Tracing: Added patching of `ddtrace_api.tracer.set_tags` to the `ddtrace_api` integration.

🐛 Bug Fixes

  • CI Visibility: Resolved an issue preventing code coverage from being enabled when ddtrace was activated via the `PYTEST_ADDOPTS` environment variable.
  • Dynamic Instrumentation: Fixed an issue causing undefined behavior due to instrumentation of the first line of iteration blocks (e.g., for loops).
  • Dynamic Instrumentation: Fixed line probes failing to instrument lines containing only `try:` for CPython 3.11 and later.
  • Tracing: Fixed the `@tracer.wrap()` decorator failing to preserve return values from generator functions, which resulted in `StopIteration.value` being `None`.
  • Tracing (rq): Enabled parsing of distributed tracing metadata in job performance monitoring.
  • LLMObs (langchain): Resolved an `AttributeError` that occurred during async task cancellation in `agenerate` calls.
  • Logging: Ensured `ddtrace.tracer.get_log_correlation_context()` returns prefixed log correlation attributes (e.g., `dd.trace_id`) matching the documentation.
  • Logging: Fixed `ddtrace.tracer.get_log_correlation_context()` incorrectly returning the current span's service name instead of the global service name.

🔧 Affected Symbols

record_exceptiongenerate_contentgenerate_content_streamddtrace_api.tracer.set_tagsddtrace.tracer.get_log_correlation_context@tracer.wrap()

⚡ Deprecations

  • The `escaped` and `timestamp` arguments in the `record_exception` method within Tracing are deprecated and scheduled for removal in version 4.0.0.