github DataDog/dd-trace-py v3.4.0rc1
3.4.0rc1

pre-release20 hours ago

Upgrade Notes

  • Profiling
    • Upgrades echion which includes performance improvements.

Deprecation Notes

  • Tracing
    • patch_all is deprecated. As an alternative to patch_all, you can use import ddtrace.auto along with DD_PATCH_MODULES if specific module patching is necessary.

New Features

  • Dynamic Instrumentation

    • Adds support for the Decimal type from the Python standard library.
  • LLM Observability

    • Introduces a integration tag to LLM Observability spans that are generated by an integration.
    • agentless_enabled and DD_LLMOBS_AGENTLESS_ENABLED now defaults to None, and will be determined automatically based on the presence of a compatible Datadog agent. agentless_enabled and DD_LLMOBS_AGENTLESS_ENABLED can still be set explicitly to True or False</span>, but is now optional for agentless users.
  • Profiling

    • Stack v2 supports CPython 3.13.
    • Adds support for native exporter on Windows.
    • Enables profiling native modules for macOS x86_64.
  • Tracing

    • Adds configuration for encoding span events as a top-level field in v0.4 payloads and introduces environment variable DD_TRACE_NATIVE_SPAN_EVENTS (disabled by default). This requires agent version 7.63.0 or later.
    • Extracts the referrer hostname from HTTP requests and stored it as http.referrer_hostname tag.

Bug Fixes

  • Fixes an issue with gevent support and the typing module on CPython >= 3.12.

  • ASM

    • Fixes a NotImplementedError that occurred when trying to deepcopy wrapped builtin functions (like open) while ASM or IAST were enabled. The error was caused by the wrapper not implementing the __deepcopy__ method.
    • SCA: Resolves an issue where some dependencies where reported with an inaccurate name.
  • CI Visibility

    • Resolves an issue where JUnit XML output would not count tests retried by Early Flake Detection, Auto Test Retries, and Attempt-to-Fix.
  • Lib-Injection

    • Avoids zombie process from telemetry sender on startup.
  • LLM Observability

    • Resolves an issue where large spans traced within a short time interval were dropped despite being under the 1 MB limit.
    • Resolves an issue with anthropic LLM spans where multiple system prompts caused missing input messages.
    • Resolves an issue where traces containing intermixed APM and LLM Observability spans caused incorrect parent IDs for LLM Observability spans.
    • Fixes an issue where LLMObs could not be enabled in a forked process when setting agentless_enabled=True or DD_LLMOBS_AGENTLESS_ENABLED=true.
    • openai: Avoids creating spans for streamed Open AI chat and completion requests that use with_raw_response since the stream cannot be traced in these cases, leading to unfinished spans.
  • Profiling

    • Resolves an issue where the Lock profiler would throw an AttributeError: '_ProfiledThreadingLock' object has no attribute '_self_acquired_at'.
  • Single-Step Instrumentation

    • Resolves an issue where using Poetry to run an application under a version of Python different from the version used to install Poetry caused automatic library injection to fail.
  • Tracing

    • graphql: Fixes an issue in GraphQL patching that threw an error when locations (an Optional field) is None. This checks for locations before setting attributes.

Other Changes

  • Single-Step Instrumentation
    • Ensures that the SSI is not used for uWSGI applications. For enablement instructions, refer to the following our advanced_usage docs.

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

NewReleases is sending notifications on new releases.