github DataDog/dd-trace-py v3.10.0rc1
3.10.0rc1

latest releases: v3.13.0, v3.12.6, v3.12.5...
pre-release2 months ago

Deprecation Notes

  • Dynamic Instrumentation:
    • The DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL environment variable has been deprecated in favor of DD_DYNAMIC_INSTRUMENTATION_UPLOAD_INTERVAL_SECONDS. The old environment variable will be removed in a future major release.

New Features

  • DSM: Add flag in set_consume_checkpoint() to indicate if DSM
    checkpoint was manually set.
  • Tracing:
    • Adds the environment variable DD_RUNTIME_METRICS_RUNTIME_ID_ENABLED to enable runtime metrics for tagging runtime metrics with the current runtime ID. This is useful for tracking runtime metrics across multiple processes. Previously, this was DD_TRACE_EXPERIMENTAL_RUNTIME_ID_ENABLED.
  • loguru,structlog,logbook:
    • Enable trace-log correlation for structured loggers by default.
    • Adds support for trace-log correlation via remote configuration. Previously, this functionality was only available for Python’s built-in logging library.
  • Dynamic Instrumentation:
  • LLM Observability:
    • Introduces tracing support for bedrock-agent-runtime invoke_agent calls. If bedrock agents tracing is enabled, the internal bedrock traces will be converted and submitted as LLM Observability spans.
    • Adds support for configuring proxy URLs for LLM Observability using the DD_LLMOBS_INSTRUMENTED_PROXY_URLS environment variable or by enabling LLM Observability with the instrumented_proxy_urls argument. Spans sent to a proxy URL will now show up as workflow spans instead of LLM spans.
    • Adds LLM Observability tracing support for the OpenAI Responses endpoint.
  • CI Visibility:
    • This introduces preliminary support to link children pytest-xdist tests (and test suites and test modules) to their parent sessions, instead of being sent as independent sessions.
  • Exception Replay:
    • Added in-product enablement support.
  • Code Security (IAST):
    • Handle IAST security controls custom validation and sanitization methods. See the Security Controls documentation for more information about this feature.
  • Profiling:
    • Add gevent support to the new stack sampling mechanism (stack v2).
  • AAP:
    • This introduces the WAF trace tagging feature. This feature enables Datadog’s security research team to efficiently gather API security findings without generating appsec events, which bypass tracer sampling mechanisms. As an example, trace-tagging rules can be used to add attributes to traces with details about the signing algorithm and expiration of a JWT token with the goal of providing authentication-related findings.

Bug Fixes

  • Tracing:
    • algoliasearch: Fix for algoliasearch dangling reference.
    • This resolves a TypeError in encoding when truncating a large bytes object.
    • Resolves a sampling issue where agent-based sampling rates were not correctly applied after a process forked or the tracer was reconfigured.
    • Resolves a bug where os.system or subprocess.Popen could return the wrong exception type.
    • This fix resolves an issue in which traced nested generator functions had their execution order subtly changed in a way that affected the stack unwinding sequence during exception handling. The issue was caused by the tracer's use of simple iteration via for v in g: yield v during the wrapping of generator functions where full bidrectional communication with the sub-generator via yield from g was appropriate. See PEP380 for an explanation of how these two generator uses differ.
  • AAP:
    • This fix resolves an issue where track_user was generating additional unexpected security activity for customers.
    • This fix resolves an issue where the new ATO SDK track_user was reporting differently email, name, scope and role of the tracked user.
  • CI Visibility:
    • This fix resolves an issue where test spans would be left unfinished if the pytest_runtest_protocol hook was overridden in conftest.py, causing the corresponding module and suite to be unfinished as well.
  • azure_functions:
    • This fix resolves an issue where functions throw an error on loading when the function_name decorator follows another decorator.
  • LLM Observability:
    • This fix resolves an issue where modifying bedrock converse streamed chunks caused traced spans to show modified content.
    • Resolved an issue where manual instrumentation would raise DD_LLMOBS_ML_APP missing errors when LLM Observability was disabled.
    • litellm: This fix resolves an out of bounds error when handling streamed responses. This error occurred when the number of choices in a streamed response was not set as a keyword argument.
    • Fixes an issue where the trace ID exported from export_span was incorrect.
  • Dynamic Instrumentation:
    • Fixed an incompatibility issue with code origin that caused line probes on the entry point functions to fail to instrument.
  • Code Origin:
    • Fixed a potential memory leak when collecting entry span location information.

Other Changes

  • Tracing:

    • Adds explicit support ranges for all integrations. These support ranges can be used in conjunction with DD_TRACE_SAFE_INSTRUMENTATION_ENABLED=true to enable safer patching of integrations, by ensuring that only compatible versions of an integration are patched.
  • Profiling:

    • The native profile exporter is now the default profile exporter, and the legacy Python exporter is removed. The DD_PROFILING_EXPORT_LIBDD_ENABLED configuration variable is removed. As a result of this change, profiling for 32-bit Linux is not supported. Please file an issue or open a support ticket if you need profiling for 32-bit Linux.
  • Single Step Instrumentation:

    • Updates library injection guardrails to use safe instrumentation patching feature DD_TRACE_SAFE_INSTRUMENTATION_ENABLED. This change ensures that instrumentation patching is only applied to for supported versions of packages, leaving unsupported package versions unpatched.

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

NewReleases is sending notifications on new releases.