releases.shpreview
Datadog/Datadog dd-trace-py

Datadog dd-trace-py

$npx -y @buildinternet/releases show datadog-dd-trace-py
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases54Avg17/moVersionsv4.2.1 → v4.7.1
Jan 6, 2026

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

Upgrade Notes

  • tracing
    • The Hooks class (config.<integration>.hooks) is deprecated and will be removed in v5.0. All hook methods (register(), on(), deregister(), emit()) are now no-op and no longer affect span behavior. To interact with spans, use ddtrace.trace_utils.get_current_span() or ddtrace.trace_utils.get_current_root_span() instead.

New Features

  • LLM Observability
    • Adds tracing of initialize requests and their responses on modelcontextprotocol/python-sdk servers.
    • This introduces automatic source:otel tagging for evaluations when OpenTelemetry (OTel) tracing is enabled when DD_TRACE_OTEL_ENABLED=true is set. This tag allows the backend to wait for OTel span conversion before processing evaluations.
    • Changes format of MCP server tool call span input, output, and tags to include the full request and response objects.
    • Reasoning token counts are now captured from VertexAI responses.
  • profiling
    • Add support for asyncio.BoundedSemaphore lock type profiling in Python Lock Profiler.
    • Add support for asyncio.Condition locking type profiling in Python. The Lock profiler now provides visibility into asyncio.Condition usage, helping identify contention in async applications using condition variables.
    • Add support for asyncio.Semaphore lock type profiling in Python Lock Profiler.
  • AAP
    • Add business logic event detection for Stripe. This feature instruments the payment intent and checkout session creation actions as well as the payment_intent.succeeded, payment_intent.payment_failed and payment_intent.canceled events.
    • Proxy inferred spans now contain events when AppSec is enabled so that they are reported on the App and API Protection Endpoint Catalog.
  • DBM
    • Adds container tags support
  • DSM
    • Adds container tags support
  • tracing
    • Proxy inferred spans now differentiate between API Gateway v1 and v2 apis by emitting the aws.httpapi span name for v2 apis when the API Gateway sets the x-dd-proxy header to aws-httpapi. Additionally, the tag http.route and the resource name of the span now contains the api resource path instead of the path when propagated with the x-dd-proxy-resource-path header.
  • vllm
    • Introduces tracing and LLM Observability support for vLLM V1 engine. Requires vLLM >= 0.10.2. See the docs for more information.

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where code coverage instrumentation in Python 3.9 would raise an exception while handling line numbers in some corner cases.
  • crash tracking
    • Passing in all environment variables to the crashtracker receiver process caused conflicts with export location derivation. This change only passes in the DD_CRASHTRACKING_ERRORS_INTAKE_ENABLED environment variable.
  • falcon
    • Fixes DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED support, which was previously ignored.
  • tracing
    • Proxy inferred spans used to omit the https:// scheme prefix as part of the http.url tag; this caused the entire url to be parsed as the http path.
    • psycopg
      • Fixes an OperationalError that occurred when patching a closed psycopg3 connection.
  • dynamic instrumentation
    • fixed an issue that caused condition expressions containing isDefined to result in an evaluation error.
    • fixed an issue that prevented autocomplete information to be extracted from the running application.
  • openfeature
    • This fix resolves an issue where Feature Flagging and Experimentation (FFE) was not receiving remote configuration in forking web server environments (gunicorn, uWSGI). This caused the OpenFeature provider to return default values instead of configured feature flags. FFE is now properly registered as a product during tracer initialization (when DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true), ensuring remote configuration is received before process forking occurs.
    • Fix exposure event deduplication to use (flag_key, subject_id) as cache key instead of (flag_key, variant_key, allocation_key). This ensures different users each receive their own exposure event while still deduplicating repeated evaluations for the same user. Also adds LRU eviction to prevent unbounded memory growth and respects the do_log flag from flag metadata.
  • ray
    • This fix resolves an issue where None metadata in Ray job submission caused a crash.
  • openai_agents
    • This fix resolves an issue where a missing active span caused an AttributeError when calling tag_agent_manifest.
  • profiling
    • This fix resolves an issue where the Lock profiler would not call the necessary initialization function, which would sometimes result in crashes.
    • the Profiler now always uses the name of leaf tasks for the "Task name" label. Previously, one of the Stacks would be labelled with the parent task's name, which would lead to inconsistent behaviour across runs.
    • Fixes a bug where code that sub-classes our wrapped locks crashes with TypeError during profiling. One example of this is neo4j's AsyncRLock, which inherits from asyncio.Lock: https://github.com/neo4j/neo4j-python-driver/blob/6.x/src/neo4j/_async_compat/concurrency.py#L45
    • a bug causing crashes when using uvloop and forking has been resolved.
    • This improves the accuracy of stacks for on-CPU asyncio Tasks by reducing the odds of Frames for a Task polluting the stack of other Tasks.
    • the build now uses the correct location for the native extension module. Previously, linking would work correctly in tests, b
Jan 5, 2026

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

Bug Fixes

  • ray
    • This fix resolves an issue where None metadata in Ray job submission caused a crash.
  • profiling
    • the build now uses the correct location for the native extension module. Previously, linking would work correctly in tests, but published wheels failed to import the memory profiler extension.
Dec 26, 2025

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

Bug Fixes

  • Debugger
    • Reverts a change added in 4.1.0 that seems to be linked to "context already registered" errors encountered when DD_CODE_ORIGIN_FOR_SPANS_ENABLED=true is set
Dec 19, 2025

Bug Fixes

  • openfeature
    • Fix exposure event deduplication to use (flag_key, subject_id) as cache key instead of (flag_key, variant_key, allocation_key). This ensures different users each receive their own exposure event while still deduplicating repeated evaluations for the same user. Also adds LRU eviction to prevent unbounded memory growth and respects the do_log flag from flag metadata.
  • openai
    • Resolves an issue where instantiating an OpenAI client with a non-string API key resulted in parsing issues.
  • profiling
    • This fix resolves an issue where the Lock profiler would not call the necessary initialization function, which would sometimes result in crashes.
Dec 18, 2025

⚠️ An issue was detected with memory profiling in this release. Please consider upgrading to v4.1.3 or newer

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

Known Issues

  • debugging: "context already registered" errors when DD_CODE_ORIGIN_FOR_SPANS_ENABLED=true is set

Upgrade Notes

  • LLM Observability
    • Experiments spans now contain metadata from the dataset record.
    • Experiments spans' input, output, expected_output fields are now emitted as is so that if data in any of the columns are objects, they can be searchable in Datadog.
    • Experiments spans and children spans are now tagged with human readable names to allow better analysis of experiments data. New tags added are: dataset_name, project_name, project_id, experiment_name.
  • tornado
    • Updated minimum supported version to v6.1+.

Deprecation Notes

  • tornado
    • Deprecated support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • profiling
    • Add support for threading.BoundedSemaphore locking type profiling in Python. The implementation follows the same approach as threading.Semaphore, properly handling internal lock detection to prevent double-counting of the underlying threading.Lock object.
    • Add support for threading.Semaphore locking type profiling in Python. The Lock profiler now detects and marks "internal" Lock objects, i.e. those that are part of implementation of higher-level locking types. One example of such higher-level primitive is threading.Semaphore, which is implemented with threading.Condition, which itself uses threading.Lock internally. Marking internal lock as "internal" will prevent it from being sampled, ensuring that the high-level (e.g. Semaphore) sample is processed.
    • This adds support for Python 3.14 in the Continuous Profiler.
    • This adds the process_id tag to profiles. The value of this tag is the current process ID (PID).
    • The stack sampler supports async generators and asyncio.wait.
    • Shows fully qualified name of functions using codeobject.co_qualname in memory profiler and lock profiler flamegraphs for Python 3.11+. Stack profiler has already been using this. This aligns the user experience across different profile types.
    • This introduces tracking for the asyncio.as_completed util in the Profiler.
    • This introduces tracking for asyncio.wait in the Profiler. This makes it possible to track dependencies between Tasks/Coroutines that await/are awaited through asyncio.wait.
  • AAP
    • attach Application and API Protection findings on API Gateway inferred spans to enable AppSec API Catalog coverage of lambda functions
    • This introduces proper support for API10 for redirected requests on urllib3
  • anthropic
    • Adds support for the Anthropic Beta client API (client.beta.messages.create() and client.beta.messages.stream()). This feature requires Anthropic client version 0.37.0 or higher.
  • aiokafka
    • Adds DSM instrumentation support.
    • Adds instrumentation support for aiokafka>=0.9.0. See the aiokafka<https://ddtrace.readthedocs.io/en/stable/integrations.html#aiokafka> documentation for more information.
  • Added support for uWSGI with gevent when threads are also patched. The use of the keyword argument thread=False is no longer required when performing monkey-patching with gevent via gevent.monkey.patch_all.
  • LLM Observability
    • Reasoning token counts are now captured from Google GenAI responses.
    • The OpenAI integration now captures prompt metadata (id, version, variables, and chat template) for reusable prompts when using the responses endpoint (available in OpenAI SDK >= 1.87.0).
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
    • Reasoning token counts are now captured from OpenAI and OpenAI Agents responses.
    • openai
      • This introduces support for capturing server-side MCP tool calls invoked via the OpenAI Responses API as a separate span.
  • langchain
    • Adds support for tracing RunnableLambda instances.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored
  • Crashtracker
    • This introduces a fallback to capture runtime stack frames when Python's _Py_DumpTracebackThreads function is not available.
  • ASGI
    • Enable context propagation between websocket message spans.

Bug Fixes

  • avro
    • Fixes an issue where Avro instrumentation does not return method results when DSM is enabled.
  • crashtracker
    • Fixes missing env variables inheritance for receiver process.
  • dynamic instrumentation
    • uploading snapshots now retries on all HTTP error codes.
  • exception replay
    • fixed the order in which frames are captured to ensure that the values of frames close to the point where the initial exception was thrown are always attached to the relevant spans.
    • fixed an infinite loop that could cause memory leaks when capturing exceptions, and improved overall speed and memory performance.
    • ensure exception information is captured when exceptions are raised by the GraphQL client library.
  • Code Security
    • Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.
  • openai
    • Resolves an issue where instantiating an OpenAI client with a non-string API key resulted in parsing issues.
  • tracing
    • Fixed a potential IndexError in partial flush when the finished span counter was out of sync with actual finished spans.
    • DD_TRACE_PARTIAL_FLUSH_MIN_SPANS values less than 1 now default to 1 with a warning.
    • Resolves a potential deadlock when forking.
    • CI Visibility: Ensure the http connection is correctly reset in all error scenarios.
  • ray
    • This fix resolves an issue where Ray jobs that did not explicitly call ray.init() at the top of their scripts were not properly instrumented, resulting in incomplete traces. To ensure full tracing capabilities, use ddtrace-run when starting your Ray cluster: DD_PATCH_MODULES="ray:true,aiohttp:false,grpc:false,requests:false" ddtrace-run ray start --head.
  • AAP
    • This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.
  • lib-injection
    • do not inject into the gsutil tool
  • LLM Observability
    • Fixes an issue where LLMObs.export_span() would raise when LLMObs is disabled.
    • Resolves an issue where self was being annotated as an input parameter using LLM Observability function decorators.
    • This fix resolves an issue where LLMObs.annotation_context() properties (tags, prompt, and name) were not applied to subsequent LLM operations within the same context block. This occurred when multiple sequential operations (such as Langchain batch calls with structured outputs) were performed, causing only the first operation to receive the annotations.
    • This fix resolves an issue where evaluation-metric labels containing dots could be interpreted as nested objects by adding validation that rejects such labels and provides a clear error message instructing users to use alternative naming conventions.
    • Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.
  • opentelemetry
    • Fixed spans going unsampled when using opentelemetry.trace.get_current_span() or NonRecordingSpan. Spans are now kept and appear in the UI unless explicitly dropped by the Agent or sampling rules.
  • profiling
    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • improve reliability when parsing an empty span.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.
    • This fix improves the detection of on-CPU asyncio Tasks. Previously, the Profiler would only consider a Task as running if its coroutine was running. The Profiler now recursively checks if any coroutine in the await chain of the Task's coroutine is running.
    • This fix makes stack sampling more accurate for on-CPU asyncio Tasks.
    • This fix resolves a race condition leading to incorrect stacks being reported for asyncio parent/child Tasks (e.g. when using asyncio.gather).
    • This fix resolves a possible crash coming from the experimental "fast memory copy" feature of the Stack Sampler. It occurred when the Profiler's signal handlers were replaced by other ones (from the application code).
    • This updates the stack sampler to fix a bug that would lead to OOMs when the sampler read invalid data from the Python process.
    • This fixes a bug where asyncio stacks would only get partial data, with some coroutines not showing.
    • This improves stack unwinding for asyncio workloads running Python 3.13+ by replicating the official PyGen_yf function from CPython 3.13. Previously, the sampler would use the version from an older version of CPython, which could lead to incomplete asyncio stacks.

Other Changes

  • Code Origin for Spans
    • Outgoing requests are no longer included with code origin for spans.
  • profiling
    • Moves echion, the Python stack sampler, to the ddtrace-py repository.
    • Store memalloc samples as native objects, avoiding calls into the cpython internal.
Dec 17, 2025

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

Upgrade Notes

  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • LLM Observability
    • Experiments spans now contain metadata from the dataset record.
    • Experiments spans' input, output, expected_output fields are now emitted as is so that if data in any of the columns are objects, they can be searchable in Datadog.
    • Experiments spans and children spans are now tagged with human readable names to allow better analysis of experiments data. New tags added are: dataset_name, project_name, project_id, experiment_name.
  • aioredis
    • The aioredis integration has been removed.
  • tornado
    • Updated minimum supported version to v6.1+.

Deprecation Notes

  • tornado
    • Deprecated support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
    • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • profiling
    • Add support for threading.BoundedSemaphore locking type profiling in Python. The implementation follows the same approach as threading.Semaphore, properly handling internal lock detection to prevent double-counting of the underlying threading.Lock object.
    • Add support for threading.Semaphore locking type profiling in Python. The Lock profiler now detects and marks "internal" Lock objects, i.e. those that are part of implementation of higher-level locking types. One example of such higher-level primitive is threading.Semaphore, which is implemented with threading.Condition, which itself uses threading.Lock internally. Marking internal lock as "internal" will prevent it from being sampled, ensuring that the high-level (e.g. Semaphore) sample is processed.
    • This adds support for Python 3.14 in the Continuous Profiler.
    • This adds the process_id tag to profiles. The value of this tag is the current process ID (PID).
    • The stack sampler supports async generators and asyncio.wait.
    • Shows fully qualified name of functions using codeobject.co_qualname in memory profiler and lock profiler flamegraphs for Python 3.11+. Stack profiler has already been using this. This aligns the user experience across different profile types.
    • This introduces tracking for the asyncio.as_completed util in the Profiler.
    • This introduces tracking for asyncio.wait in the Profiler. This makes it possible to track dependencies between Tasks/Coroutines that await/are awaited through asyncio.wait.
  • AAP
    • attach Application and API Protection findings on API Gateway inferred spans to enable AppSec API Catalog coverage of lambda functions
    • This introduces proper support for API10 for redirected requests on urllib3
  • anthropic
    • Adds support for the Anthropic Beta client API (client.beta.messages.create() and client.beta.messages.stream()). This feature requires Anthropic client version 0.37.0 or higher.
  • aiokafka
    • Adds DSM instrumentation support.
    • Adds instrumentation support for aiokafka>=0.9.0. See the aiokafka<https://ddtrace.readthedocs.io/en/stable/integrations.html#aiokafka> documentation for more information.
  • Added support for uWSGI with gevent when threads are also patched. The use of the keyword argument thread=False is no longer required when performing monkey-patching with gevent via gevent.monkey.patch_all.
  • LLM Observability
    • Reasoning token counts are now captured from Google GenAI responses.
    • The OpenAI integration now captures prompt metadata (id, version, variables, and chat template) for reusable prompts when using the responses endpoint (available in OpenAI SDK >= 1.87.0).
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
    • Reasoning token counts are now captured from OpenAI and OpenAI Agents responses.
    • openai
      • This introduces support for capturing server-side MCP tool calls invoked via the OpenAI Responses API as a separate span.
  • langchain
    • Adds support for tracing RunnableLambda instances.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored
  • Crashtracker
    • This introduces a fallback to capture runtime stack frames when Python's _Py_DumpTracebackThreads function is not available.
  • ASGI
    • Enable context propagation between websocket message spans.

Bug Fixes

  • avro
    • Fixes an issue where Avro instrumentation does not return method results when DSM is enabled.
  • crashtracker
    • Fixes missing env variables inheritance for receiver process.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
    • uploading snapshots now retries on all HTTP error codes.
  • exception replay
    • fixed the order in which frames are captured to ensure that the values of frames close to the point where the initial exception was thrown are always attached to the relevant spans.
    • fixed an infinite loop that could cause memory leaks when capturing exceptions, and improved overall speed and memory performance.
    • ensure exception information is captured when exceptions are raised by the GraphQL client library.
  • Code Security
    • Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.
  • openai
    • Resolves an issue where instantiating an OpenAI client with a non-string API key resulted in parsing issues.
  • tracing
    • Fixed a potential IndexError in partial flush when the finished span counter was out of sync with actual finished spans.
    • DD_TRACE_PARTIAL_FLUSH_MIN_SPANS values less than 1 now default to 1 with a warning.
    • Resolves a potential deadlock when forking.
    • CI Visibility: Ensure the http connection is correctly reset in all error scenarios.
  • ray
    • This fix resolves an issue where Ray jobs that did not explicitly call ray.init() at the top of their scripts were not properly instrumented, resulting in incomplete traces. To ensure full tracing capabilities, use ddtrace-run when starting your Ray cluster: DD_PATCH_MODULES="ray:true,aiohttp:false,grpc:false,requests:false" ddtrace-run ray start --head.
  • AAP
    • This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.
  • lib-injection
    • do not inject into the gsutil tool
  • LLM Observability
    • Fixes an issue where LLMObs.export_span() would raise when LLMObs is disabled.
    • Resolves an issue where self was being annotated as an input parameter using LLM Observability function decorators.
    • This fix resolves an issue where LLMObs.annotation_context() properties (tags, prompt, and name) were not applied to subsequent LLM operations within the same context block. This occurred when multiple sequential operations (such as Langchain batch calls with structured outputs) were performed, causing only the first operation to receive the annotations.
    • This fix resolves an issue where evaluation-metric labels containing dots could be interpreted as nested objects by adding validation that rejects such labels and provides a clear error message instructing users to use alternative naming conventions.
    • Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.
  • opentelemetry
    • Fixed spans going unsampled when using opentelemetry.trace.get_current_span() or NonRecordingSpan. Spans are now kept and appear in the UI unless explicitly dropped by the Agent or sampling rules.
  • profiling
    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • improve reliability when parsing an empty span.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.
    • This fix improves the detection of on-CPU asyncio Tasks. Previously, the Profiler would only consider a Task as running if its coroutine was running. The Profiler now recursively checks if any coroutine in the await chain of the Task's coroutine is running.
    • This fix makes stack sampling more accurate for on-CPU asyncio Tasks.
    • This fix resolves a race condition leading to incorrect stacks being reported for asyncio parent/child Tasks (e.g. when using asyncio.gather).
    • This fix resolves a possible crash coming from the experimental "fast memory copy" feature of the Stack Sampler. It occurred when the Profiler's signal handlers were replaced by other ones (from the application code).
    • This updates the stack sampler to fix a bug that would lead to OOMs when the sampler read invalid data from the Python process.
    • This fixes a bug where asyncio stacks would only get partial data, with some coroutines not showing.
    • This improves stack unwinding for asyncio workloads running Python 3.13+ by replicating the official PyGen_yf function from CPython 3.13. Previously, the sampler would use the version from an older version of CPython, which could lead to incomplete asyncio stacks.

Other Changes

  • Code Origin for Spans
    • Outgoing requests are no longer included with code origin for spans.
  • profiling
    • Moves echion, the Python stack sampler, to the ddtrace-py repository.
    • Store memalloc samples as native objects, avoiding calls into the cpython internal.
Dec 16, 2025

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

Upgrade Notes

  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • LLM Observability
    • Experiments spans now contain metadata from the dataset record.
    • Experiments spans' input, output, expected_output fields are now emitted as is so that if data in any of the columns are objects, they can be searchable in Datadog.
    • Experiments spans and children spans are now tagged with human readable names to allow better analysis of experiments data. New tags added are: dataset_name, project_name, project_id, experiment_name.
  • aioredis
    • The aioredis integration has been removed.
  • tornado
    • Updated minimum supported version to v6.1+.

Deprecation Notes

  • tornado
    • Deprecated support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
    • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • profiling
    • Add support for threading.BoundedSemaphore locking type profiling in Python. The implementation follows the same approach as threading.Semaphore, properly handling internal lock detection to prevent double-counting of the underlying threading.Lock object.
    • Add support for threading.Semaphore locking type profiling in Python. The Lock profiler now detects and marks "internal" Lock objects, i.e. those that are part of implementation of higher-level locking types. One example of such higher-level primitive is threading.Semaphore, which is implemented with threading.Condition, which itself uses threading.Lock internally. Marking internal lock as "internal" will prevent it from being sampled, ensuring that the high-level (e.g. Semaphore) sample is processed.
    • This adds support for Python 3.14 in the Continuous Profiler.
    • This adds the process_id tag to profiles. The value of this tag is the current process ID (PID).
    • The stack sampler supports async generators and asyncio.wait.
    • Shows fully qualified name of functions using codeobject.co_qualname in memory profiler and lock profiler flamegraphs for Python 3.11+. Stack profiler has already been using this. This aligns the user experience across different profile types.
    • This introduces tracking for the asyncio.as_completed util in the Profiler.
    • This introduces tracking for asyncio.wait in the Profiler. This makes it possible to track dependencies between Tasks/Coroutines that await/are awaited through asyncio.wait.
  • AAP
    • attach Application and API Protection findings on API Gateway inferred spans to enable AppSec API Catalog coverage of lambda functions
    • This introduces proper support for API10 for redirected requests on urllib3
  • anthropic
    • Adds support for the Anthropic Beta client API (client.beta.messages.create() and client.beta.messages.stream()). This feature requires Anthropic client version 0.37.0 or higher.
  • aiokafka
    • Adds DSM instrumentation support.
    • Adds instrumentation support for aiokafka>=0.9.0. See the aiokafka<https://ddtrace.readthedocs.io/en/stable/integrations.html#aiokafka> documentation for more information.
  • Added support for uWSGI with gevent when threads are also patched. The use of the keyword argument thread=False is no longer required when performing monkey-patching with gevent via gevent.monkey.patch_all.
  • LLM Observability
    • Reasoning token counts are now captured from Google GenAI responses.
    • The OpenAI integration now captures prompt metadata (id, version, variables, and chat template) for reusable prompts when using the responses endpoint (available in OpenAI SDK >= 1.87.0).
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
    • Reasoning token counts are now captured from OpenAI and OpenAI Agents responses.
    • openai
      • This introduces support for capturing server-side MCP tool calls invoked via the OpenAI Responses API as a separate span.
  • langchain
    • Adds support for tracing RunnableLambda instances.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored
  • Crashtracker
    • This introduces a fallback to capture runtime stack frames when Python's _Py_DumpTracebackThreads function is not available.
  • ASGI
    • Enable context propagation between websocket message spans.

Bug Fixes

  • avro
    • Fixes an issue where Avro instrumentation does not return method results when DSM is enabled.
  • crashtracker
    • Fixes missing env variables inheritance for receiver process.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
    • uploading snapshots now retries on all HTTP error codes.
  • exception replay
    • fixed the order in which frames are captured to ensure that the values of frames close to the point where the initial exception was thrown are always attached to the relevant spans.
    • fixed an infinite loop that could cause memory leaks when capturing exceptions, and improved overall speed and memory performance.
    • ensure exception information is captured when exceptions are raised by the GraphQL client library.
  • Code Security
    • Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.
  • openai
    • Resolves an issue where instantiating an OpenAI client with a non-string API key resulted in parsing issues.
  • tracing
    • Fixed a potential IndexError in partial flush when the finished span counter was out of sync with actual finished spans.
    • DD_TRACE_PARTIAL_FLUSH_MIN_SPANS values less than 1 now default to 1 with a warning.
    • Resolves a potential deadlock when forking.
    • CI Visibility: Ensure the http connection is correctly reset in all error scenarios.
  • ray
    • This fix resolves an issue where Ray jobs that did not explicitly call ray.init() at the top of their scripts were not properly instrumented, resulting in incomplete traces. To ensure full tracing capabilities, use ddtrace-run when starting your Ray cluster: DD_PATCH_MODULES="ray:true,aiohttp:false,grpc:false,requests:false" ddtrace-run ray start --head.
  • AAP
    • This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.
  • lib-injection
    • do not inject into the gsutil tool
  • LLM Observability
    • Fixes an issue where LLMObs.export_span() would raise when LLMObs is disabled.
    • Resolves an issue where self was being annotated as an input parameter using LLM Observability function decorators.
    • This fix resolves an issue where LLMObs.annotation_context() properties (tags, prompt, and name) were not applied to subsequent LLM operations within the same context block. This occurred when multiple sequential operations (such as Langchain batch calls with structured outputs) were performed, causing only the first operation to receive the annotations.
    • This fix resolves an issue where evaluation-metric labels containing dots could be interpreted as nested objects by adding validation that rejects such labels and provides a clear error message instructing users to use alternative naming conventions.
    • Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.
  • opentelemetry
    • Fixed spans going unsampled when using opentelemetry.trace.get_current_span() or NonRecordingSpan. Spans are now kept and appear in the UI unless explicitly dropped by the Agent or sampling rules.
  • profiling
    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • improve reliability when parsing an empty span.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.
    • This fix improves the detection of on-CPU asyncio Tasks. Previously, the Profiler would only consider a Task as running if its coroutine was running. The Profiler now recursively checks if any coroutine in the await chain of the Task's coroutine is running.
    • This fix makes stack sampling more accurate for on-CPU asyncio Tasks.
    • This fix resolves a race condition leading to incorrect stacks being reported for asyncio parent/child Tasks (e.g. when using asyncio.gather).
    • This fix resolves a possible crash coming from the experimental "fast memory copy" feature of the Stack Sampler. It occurred when the Profiler's signal handlers were replaced by other ones (from the application code).
    • This updates the stack sampler to fix a bug that would lead to OOMs when the sampler read invalid data from the Python process.
    • This fixes a bug where asyncio stacks would only get partial data, with some coroutines not showing.
    • This improves stack unwinding for asyncio workloads running Python 3.13+ by replicating the official PyGen_yf function from CPython 3.13. Previously, the sampler would use the version from an older version of CPython, which could lead to incomplete asyncio stacks.

Other Changes

  • Code Origin for Spans
    • Outgoing requests are no longer included with code origin for spans.
  • profiling
    • Moves echion, the Python stack sampler, to the ddtrace-py repository.
    • Store memalloc samples as native objects, avoiding calls into the cpython internal.

Bug Fixes

  • tracing:
    • Resolves a potential deadlock when forking.

Bug Fixes

  • Code Security:

    • Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.
  • tracing:

    • Resolves a potential deadlock when forking.
  • LLM Observability:

    • Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.
  • AAP:

    • This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.
  • lib-injection:

    • do not inject into the gsutil tool
  • profiling:

    • improve reliability when parsing an empty span.
    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.

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

Bug Fixes

  • Profiling: improve reliability when parsing an empty span.
Dec 15, 2025

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

Prelude

dd-trace-py now includes an OpenFeature provider implementation, enabling feature flag evaluation through the OpenFeature API. This integration is under active design and development. Functionality and APIs are experimental and may change without notice. For more information, see the Datadog documentation at https://docs.datadoghq.com/feature_flags/#overview

Upgrade Notes

  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • LLM Observability
    • Experiments spans now contain metadata from the dataset record.
    • Experiments spans' input, output, expected_output fields are now emitted as is so that if data in any of the columns are objects, they can be searchable in Datadog.
    • Experiments spans and children spans are now tagged with human readable names to allow better analysis of experiments data. New tags added are: dataset_name, project_name, project_id, experiment_name.
  • aioredis
    • The aioredis integration has been removed.
  • tornado
    • Updated minimum supported version to v6.1+.

Deprecation Notes

  • tornado
    • Deprecated support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
    • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • profiling
    • Add support for threading.BoundedSemaphore locking type profiling in Python. The implementation follows the same approach as threading.Semaphore, properly handling internal lock detection to prevent double-counting of the underlying threading.Lock object.
    • Add support for threading.Semaphore locking type profiling in Python. The Lock profiler now detects and marks "internal" Lock objects, i.e. those that are part of implementation of higher-level locking types. One example of such higher-level primitive is threading.Semaphore, which is implemented with threading.Condition, which itself uses threading.Lock internally. Marking internal lock as "internal" will prevent it from being sampled, ensuring that the high-level (e.g. Semaphore) sample is processed.
    • This adds support for Python 3.14 in the Continuous Profiler.
    • This adds the process_id tag to profiles. The value of this tag is the current process ID (PID).
    • The stack sampler supports async generators and asyncio.wait.
    • Shows fully qualified name of functions using codeobject.co_qualname in memory profiler and lock profiler flamegraphs for Python 3.11+. Stack profiler has already been using this. This aligns the user experience across different profile types.
    • This introduces tracking for the asyncio.as_completed util in the Profiler.
    • This introduces tracking for asyncio.wait in the Profiler. This makes it possible to track dependencies between Tasks/Coroutines that await/are awaited through asyncio.wait.
  • AAP
    • attach Application and API Protection findings on API Gateway inferred spans to enable AppSec API Catalog coverage of lambda functions
    • This introduces proper support for API10 for redirected requests on urllib3
  • anthropic
    • Adds support for the Anthropic Beta client API (client.beta.messages.create() and client.beta.messages.stream()). This feature requires Anthropic client version 0.37.0 or higher.
  • aiokafka
    • Adds DSM instrumentation support.
    • Adds instrumentation support for aiokafka>=0.9.0. See the aiokafka<https://ddtrace.readthedocs.io/en/stable/integrations.html#aiokafka> documentation for more information.
  • Added support for uWSGI with gevent when threads are also patched. The use of the keyword argument thread=False is no longer required when performing monkey-patching with gevent via gevent.monkey.patch_all.
  • LLM Observability
    • Reasoning token counts are now captured from Google GenAI responses.
    • The OpenAI integration now captures prompt metadata (id, version, variables, and chat template) for reusable prompts when using the responses endpoint (available in OpenAI SDK >= 1.87.0).
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
    • Reasoning token counts are now captured from OpenAI and OpenAI Agents responses.
    • openai
      • This introduces support for capturing server-side MCP tool calls invoked via the OpenAI Responses API as a separate span.
  • langchain
    • Adds support for tracing RunnableLambda instances.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored
  • Crashtracker
    • This introduces a fallback to capture runtime stack frames when Python's _Py_DumpTracebackThreads function is not available.
  • ASGI
    • Enable context propagation between websocket message spans.

Bug Fixes

  • avro
    • Fixes an issue where Avro instrumentation does not return method results when DSM is enabled.
  • crashtracker
    • Fixes missing env variables inheritance for receiver process.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
    • uploading snapshots now retries on all HTTP error codes.
  • exception replay
    • fixed the order in which frames are captured to ensure that the values of frames close to the point where the initial exception was thrown are always attached to the relevant spans.
    • fixed an infinite loop that could cause memory leaks when capturing exceptions, and improved overall speed and memory performance.
    • ensure exception information is captured when exceptions are raised by the GraphQL client library.
  • Code Security
    • Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.
  • openai
    • Resolves an issue where instantiating an OpenAI client with a non-string API key resulted in parsing issues.
  • tracing
    • Fixed a potential IndexError in partial flush when the finished span counter was out of sync with actual finished spans.
    • DD_TRACE_PARTIAL_FLUSH_MIN_SPANS values less than 1 now default to 1 with a warning.
    • CI Visibility: Ensure the http connection is correctly reset in all error scenarios.
  • ray
    • This fix resolves an issue where Ray jobs that did not explicitly call ray.init() at the top of their scripts were not properly instrumented, resulting in incomplete traces. To ensure full tracing capabilities, use ddtrace-run when starting your Ray cluster: DD_PATCH_MODULES="ray:true,aiohttp:false,grpc:false,requests:false" ddtrace-run ray start --head.
  • AAP
    • This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.
  • lib-injection
    • do not inject into the gsutil tool
  • LLM Observability
    • Fixes an issue where LLMObs.export_span() would raise when LLMObs is disabled.
    • Resolves an issue where self was being annotated as an input parameter using LLM Observability function decorators.
    • This fix resolves an issue where LLMObs.annotation_context() properties (tags, prompt, and name) were not applied to subsequent LLM operations within the same context block. This occurred when multiple sequential operations (such as Langchain batch calls with structured outputs) were performed, causing only the first operation to receive the annotations.
    • This fix resolves an issue where evaluation-metric labels containing dots could be interpreted as nested objects by adding validation that rejects such labels and provides a clear error message instructing users to use alternative naming conventions.
    • Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.
  • opentelemetry
    • Fixed spans going unsampled when using opentelemetry.trace.get_current_span() or NonRecordingSpan. Spans are now kept and appear in the UI unless explicitly dropped by the Agent or sampling rules.
  • profiling
    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • improve reliability when parsing an empty span.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.
    • This fix improves the detection of on-CPU asyncio Tasks. Previously, the Profiler would only consider a Task as running if its coroutine was running. The Profiler now recursively checks if any coroutine in the await chain of the Task's coroutine is running.
    • This fix makes stack sampling more accurate for on-CPU asyncio Tasks.
    • This fix resolves a race condition leading to incorrect stacks being reported for asyncio parent/child Tasks (e.g. when using asyncio.gather).
    • This fix resolves a possible crash coming from the experimental "fast memory copy" feature of the Stack Sampler. It occurred when the Profiler's signal handlers were replaced by other ones (from the application code).
    • This updates the stack sampler to fix a bug that would lead to OOMs when the sampler read invalid data from the Python process.
    • This fixes a bug where asyncio stacks would only get partial data, with some coroutines not showing.
    • This improves stack unwinding for asyncio workloads running Python 3.13+ by replicating the official PyGen_yf function from CPython 3.13. Previously, the sampler would use the version from an older version of CPython, which could lead to incomplete asyncio stacks.

Other Changes

  • Code Origin for Spans
    • Outgoing requests are no longer included with code origin for spans.
  • profiling
    • Moves echion, the Python stack sampler, to the ddtrace-py repository.
    • Store memalloc samples as native objects, avoiding calls into the cpython internal.
Dec 12, 2025

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

Deprecation Notes

  • Tornado:
    • Deprecated support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
    • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.

Bug Fixes

  • AAP: This fix resolves an issue where the appsec layer was not compatible anymore with the lambda/serverless version of the tracer.

  • Code Security: Fixes critical memory safety issue in IAST when used with forked worker processes (MCP servers with Gunicorn and Uvicorn). Workers previously crashed with segmentation faults due to stale PyObject pointers in native taint maps after fork.

  • Dynamic instrumentation: fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.

  • Exception replay: ensure exception information is captured when exceptions are raised by the GraphQL client library.

  • Lib-injection: do not inject into the gsutil tool

  • LLM Observability: Fixes an issue where the Google ADK integration would throw an AttributeError when trying to access the name or description attributes of a tool.

  • Profiling:

    • This fix resolves a critical issue where the Lock Profiler generated release samples for non-sampled lock acquires, resulting in inflated or negative (when integer overflows) lock hold times (e.g., "3.24k days per minute", "-970 days per minute"). This affected virtually all customers using sampling rates < 100% (which should be the majority).
    • This fix prevents a use-after-free crash from the memory profiler on Python version 3.10 and 3.11. The previous attempt to fix this bug itself had a bug, which this fix addresses.
    • Fixes a segmentation fault caused by accessing frame.f_locals while trying to retrieve class name of a PyFrameObject.
  • Tracing:

    • Fixed a potential IndexError in partial flush when the finished span counter was out of sync with actual finished spans.
    • DD_TRACE_PARTIAL_FLUSH_MIN_SPANS values less than 1 now default to 1 with a warning.
Nov 21, 2025

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

Upgrade Notes

  • profiling
    • This updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.

Deprecation Notes

  • tracing
    • Span.finished setter is deprecated, use Span.finish() method instead.
    • Span.finish_with_ancestors() is deprecated with no alternative.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
  • LLM Observability
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • Add support for HTTPS_PROXY.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
  • other
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.
Nov 20, 2025

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

This is a major-version release that contains many backwards-incompatible changes to public APIs. To find which of these your code relies on, follow the "deprecation warnings" instructions here.

dd-trace-py now includes an OpenFeature provider implementation, enabling feature flag evaluation through the OpenFeature API.

This integration is under active design and development. Functionality and APIs are experimental and may change without notice. For more information, see the Datadog documentation at https://docs.datadoghq.com/feature_flags/#overview

Breaking Changes

  • Support for ddtrace with Python 3.8 is removed after being deprecated in the 3.0 release line. Use ddtrace 4.x with Python 3.9 or newer.
  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • mongoengine
    • Drops support for the ddtrace.Pin object with mongoengine. With this change, the ddtrace library no longer directly supports mongoengine. Mongoengine will be supported through the pymongo integration.
  • CI Visibility
    • Removed deprecated entry points for the pytest_benchmark and pytest_bdd integrations. These plugins are now supported by the regular pytest integration.
  • dynamic instrumentation
    • removed the deprecated DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL variable.
  • exception replay
    • removed the deprecated DD_EXCEPTION_DEBUGGING_ENABLED variable.
  • tracing
    • Deprecated methods have been removed
      • Span.set_tag_str has been removed, use Span.set_tag instead.
      • Span.set_struct_tag has been removed.
      • Span.get_struct_tag has been removed.
      • Span._pprint has been removed
      • Span.finished setter was removed, please use Span.finish() method instead.
      • Tracer.on_start_span method has been removed.
      • Tracer.deregister_on_start_span method has been removed.
      • ddtrace.trace.Pin has been removed.
      • Span.finish_with_ancestors was removed with no replacement.
    • Some methods have had their type signatures changed
      • Span.set_tag typing is now set_tag(key: str, value: Optional[str] = None) -> None
      • Span.get_tag typing is now get_tag(key: str) -> Optional[str]
      • Span.set_tags typing is now set_tags(tags: dict[str, str]) -> None
      • Span.get_tags typing is now get_tags() -> dict[str, str]
      • Span.set_metric typing is now set_metric(key: str, value: int | float) -> None
      • Span.get_metric typing is now get_metric(key: str) -> Optional[int | float]
      • Span.set_metrics typing is now set_metrics(metrics: Dict[str, int | float]) -> None
      • Span.get_metrics typing is now get_metrics() -> dict[str, int | float]
    • Span.record_exception's timestamp and escaped parameters are removed
  • LLM Observability
    • manual instrumentation methods, including LLMObs.annotate(), LLMObs.export_span(), LLMObs.submit_evaluation(), LLMObs.inject_distributed_headers(), and LLMObs.activate_distributed_headers() now raise exceptions instead of logging. LLM Observability auto-instrumentation is not affected.
    • LLMObs.submit_evaluation_for() has been removed. Please use LLMObs.submit_evaluation() instead for submitting evaluations. To migrate:
      • LLMObs.submit_evaluation_for(...) users: rename to LLMObs.submit_evaluation(...)
      • LLMObs.submit_evaluation_for(...) users: rename the span_context argument to span, i.e. LLMObs.submit_evaluation(span_context={"span_id": ..., "trace_id": ...}, ...) to LLMObs.submit_evaluation(span={"span_id": ..., "trace_id": ...}, ...)
  • profiling
    • this updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.
    • The V1 stack profiler is removed. V2 has been enabled by default since v2.20.0. DD_PROFILING_STACK_V2_ENABLED is now removed.
  • freezegun
    • The deprecated freezegun integration is now removed.
  • opentracer
    • This change removes the deprecated opentracer package
  • aioredis
    • The aioredis integration has been removed.
  • google_generativeai
    • The google_generativeai integration has been removed as the google_generativeai library has reached end-of-life. As an alternative, you can use the recommended google_genai library and corresponding integration instead.
  • openai
    • Streamed chat/completions will no longer have token counts computed using the tiktoken library, and instead will default to having their token counts estimated if not explicitly provided in the OpenAI response object. To guarantee accurate streamed token metrics, set stream_options={"include_usage": True} in the OpenAI request.
  • django
    • This upgrades the default tracing behavior to enable minimal tracing mode by default (DD_DJANGO_TRACING_MINIMAL now defaults to true). Django ORM, cache, and template instrumentation are disabled by default to eliminate duplicate span creation since library integrations for database drivers (psycopg, MySQLdb, sqlite3), cache clients (redis, memcached), template renderers (Jinja2), and other supported libraries continue to be traced. This reduces performance overhead by removing redundant Django-layer instrumentation. To restore all Django instrumentation, set DD_DJANGO_TRACING_MINIMAL=false, or enable individual features using DD_DJANGO_INSTRUMENT_DATABASES=true, DD_DJANGO_INSTRUMENT_CACHES=true, and DD_DJANGO_INSTRUMENT_TEMPLATES=true.
    • When DD_DJANGO_INSTRUMENT_DATABASES=true (default false), database instrumentation now merges Django-specific tags into database driver spans created by supported integrations (psycopg, sqlite3, MySQLdb, etc.) instead of creating duplicate Django database spans. If the database cursor is not already wrapped by a supported integration, Django wraps it and creates a span. This change reduces overhead and duplicate spans while preserving visibility into database operations.
  • Other
    • This change removes the ddtrace.settings package. Environment variables should be used to adjust settings.
    • This change removes the deprecated non_active_span parameter to HttpPropagator.inject
    • This change removes the deprecated environment variable DEFAULT_RUNTIME_METRICS_INTERVAL.

Deprecation Notes

  • Support for ddtrace with Python 3.9 is deprecated after Python 3.9 reached its end-of-life.
  • Deprecates support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
  • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
    • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known. API Security reuses the endpoint inferred by the trace resource renaming feature or recomputes it when it is not available to perform sampling instead.
    • AppSec instrumentation for downstream request is now enabled by default for urllib3 and requests. It does not require enabling APM instrumentation for urllib3 anymore.
  • profiling
    • Add support for threading.RLock (reentrant lock) profiling. The Lock profiler now tracks both threading.Lock and threading.RLock usage, providing comprehensive lock contention visibility for Python applications.
  • LLM Observability
    • Previous dataset versions can be optionally pulled by passing the version argument to LLMObs.pull_dataset
    • Datasets have new properties version and latest_version to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
    • This fix resolves performance issue affecting coverage collection for Python 3.12+
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • add support for HTTPS_PROXY.
    • Resolves an issue in the bedrock integration where invoking cohere rerank models would result in missing spans due to output formatting index errors.
    • Corrected the description of the assessment argument in submit_evaluation().
    • Resolves an issue where the langchain integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
    • DD_PROFILING_API_TIMEOUT doesn't have any effect, and is marked to be removed in upcoming 4.0 release. New environment variable DD_PROFILING_API_TIMEOUT_MS is introduced to configure timeout for uploading profiles to the backend. The default value is 10000 ms (10 seconds)
    • Upgrades echion to resolve an issue where stack profiler can allocate a large amount of memory unnecessarily. Resolves another issue where the profiler can loop infinitely on Python 3.13.
    • This fix resolves an issue where AssertionError exceptions were silently suppressed in the _acquire method of the Lock profiler (note: this only occurs when assertions are enabled.)
  • kafka
    • This fix resolves an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages
  • langchain
    • This fix resolves an issue where auto instrumented prompt templates incorrectly included a version field. The version field is now omitted unless explicitly set by the user. assessment now refers to whether the evaluation itself passes or fails according to your application, rather than the validity of the evaluation result. The langchain integration will trace Azure OpenAI spans as workflow spans if there is an equivalent llm span from the openai integration.
    • Fixes an issue where streamed responses that end before the first chunk is received would result in an IndexError.
  • openai
    • This fix resolves an issue where using async iteration with paginated methods (e.g., async for model in client.models.list()) caused a TypeError: 'async for' requires an object with __aiter__ method, got coroutine. See issue #14574.
  • opentelemetry
    • Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
    • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace. ddtrace internal connections (gRPC and HTTP) are now excluded from tracing to prevent circular instrumentation.
  • pytest plugin
    • fix for potential KeyError exceptions in test runs when gevent is detected within the environment.
  • code origin
    • ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • ray
    • This fix resolves an issue where the tracer raised an error when submitting Ray tasks without explicitly calling ray.init().
    • This fix resolves an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
    • This fix stops instrumenting internal Ray actors (those starting with underscore) that were causing excessive noise, and adds ray.data._internal to the module denylist.
  • IAST
    • Fixed an issue where using weak hashing or cipher algorithms outside of a request context (e.g., during application startup) could raise an unhandled exception. The fix ensures proper error handling when IAST operations are performed without an active request context.
  • tracer
    • This fix resolves an issue where an application instrumented by ddtrace could crash at start. Fix compatibility with zope.event==6.0
    • This fix ensures compatibility with wrapt 2.0.0
  • logging
    • Fixed ddtrace internal logging when trace-log correlation is disabled. Prevents ValueError: Formatting field not found in record: 'dd.service'.
  • Other
    • Fix a potential race condition in the tracer.
    • Fix the Python Detector regular expression so it also detects paths ending with only the major version number.
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.

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

This is a major-version release that contains many backwards-incompatible changes to public APIs. To find which of these your code relies on, follow the "deprecation warnings" instructions here.

dd-trace-py now includes an OpenFeature provider implementation, enabling feature flag evaluation through the OpenFeature API.

This integration is under active design and development. Functionality and APIs are experimental and may change without notice. For more information, see the Datadog documentation at https://docs.datadoghq.com/feature_flags/#overview

Breaking Changes

  • Support for ddtrace with Python 3.8 is removed after being deprecated in the 3.0 release line. Use ddtrace 4.x with Python 3.9 or newer.
  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • mongoengine
    • Drops support for the ddtrace.Pin object with mongoengine. With this change, the ddtrace library no longer directly supports mongoengine. Mongoengine will be supported through the pymongo integration.
  • CI Visibility
    • Removed deprecated entry points for the pytest_benchmark and pytest_bdd integrations. These plugins are now supported by the regular pytest integration.
  • dynamic instrumentation
    • removed the deprecated DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL variable.
  • exception replay
    • removed the deprecated DD_EXCEPTION_DEBUGGING_ENABLED variable.
  • tracing
    • Deprecated methods have been removed
      • Span.set_tag_str has been removed, use Span.set_tag instead.
      • Span.set_struct_tag has been removed.
      • Span.get_struct_tag has been removed.
      • Span._pprint has been removed
      • Span.finished setter was removed, please use Span.finish() method instead.
      • Tracer.on_start_span method has been removed.
      • Tracer.deregister_on_start_span method has been removed.
      • ddtrace.trace.Pin has been removed.
      • Span.finish_with_ancestors was removed with no replacement.
    • Some methods have had their type signatures changed
      • Span.set_tag typing is now set_tag(key: str, value: Optional[str] = None) -> None
      • Span.get_tag typing is now get_tag(key: str) -> Optional[str]
      • Span.set_tags typing is now set_tags(tags: dict[str, str]) -> None
      • Span.get_tags typing is now get_tags() -> dict[str, str]
      • Span.set_metric typing is now set_metric(key: str, value: int | float) -> None
      • Span.get_metric typing is now get_metric(key: str) -> Optional[int | float]
      • Span.set_metrics typing is now set_metrics(metrics: Dict[str, int | float]) -> None
      • Span.get_metrics typing is now get_metrics() -> dict[str, int | float]
    • Span.record_exception's timestamp and escaped parameters are removed
  • LLM Observability
    • manual instrumentation methods, including LLMObs.annotate(), LLMObs.export_span(), LLMObs.submit_evaluation(), LLMObs.inject_distributed_headers(), and LLMObs.activate_distributed_headers() now raise exceptions instead of logging. LLM Observability auto-instrumentation is not affected.
    • LLMObs.submit_evaluation_for() has been removed. Please use LLMObs.submit_evaluation() instead for submitting evaluations. To migrate:
      • LLMObs.submit_evaluation_for(...) users: rename to LLMObs.submit_evaluation(...)
      • LLMObs.submit_evaluation_for(...) users: rename the span_context argument to span, i.e. LLMObs.submit_evaluation(span_context={"span_id": ..., "trace_id": ...}, ...) to LLMObs.submit_evaluation(span={"span_id": ..., "trace_id": ...}, ...)
  • profiling
    • this updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.
    • The V1 stack profiler is removed. V2 has been enabled by default since v2.20.0. DD_PROFILING_STACK_V2_ENABLED is now removed.
  • freezegun
    • The deprecated freezegun integration is now removed.
  • opentracer
    • This change removes the deprecated opentracer package
  • aioredis
    • The aioredis integration has been removed.
  • google_generativeai
    • The google_generativeai integration has been removed as the google_generativeai library has reached end-of-life. As an alternative, you can use the recommended google_genai library and corresponding integration instead.
  • openai
    • Streamed chat/completions will no longer have token counts computed using the tiktoken library, and instead will default to having their token counts estimated if not explicitly provided in the OpenAI response object. To guarantee accurate streamed token metrics, set stream_options={"include_usage": True} in the OpenAI request.
  • django
    • This upgrades the default tracing behavior to enable minimal tracing mode by default (DD_DJANGO_TRACING_MINIMAL now defaults to true). Django ORM, cache, and template instrumentation are disabled by default to eliminate duplicate span creation since library integrations for database drivers (psycopg, MySQLdb, sqlite3), cache clients (redis, memcached), template renderers (Jinja2), and other supported libraries continue to be traced. This reduces performance overhead by removing redundant Django-layer instrumentation. To restore all Django instrumentation, set DD_DJANGO_TRACING_MINIMAL=false, or enable individual features using DD_DJANGO_INSTRUMENT_DATABASES=true, DD_DJANGO_INSTRUMENT_CACHES=true, and DD_DJANGO_INSTRUMENT_TEMPLATES=true.
    • When DD_DJANGO_INSTRUMENT_DATABASES=true (default false), database instrumentation now merges Django-specific tags into database driver spans created by supported integrations (psycopg, sqlite3, MySQLdb, etc.) instead of creating duplicate Django database spans. If the database cursor is not already wrapped by a supported integration, Django wraps it and creates a span. This change reduces overhead and duplicate spans while preserving visibility into database operations.
  • Other
    • This change removes the ddtrace.settings package. Environment variables should be used to adjust settings.
    • This change removes the deprecated non_active_span parameter to HttpPropagator.inject
    • This change removes the deprecated environment variable DEFAULT_RUNTIME_METRICS_INTERVAL.

Deprecation Notes

  • Support for ddtrace with Python 3.9 is deprecated after Python 3.9 reached its end-of-life.
  • Deprecates support for Tornado versions older than v6.1. Use Tornado v6.1 or later.
  • Deprecates programmatic tracing configuration via the ddtrace.contrib.tornado module. Configure tracing using environment variables and import ddtrace.auto instead.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
    • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known. API Security reuses the endpoint inferred by the trace resource renaming feature or recomputes it when it is not available to perform sampling instead.
    • AppSec instrumentation for downstream request is now enabled by default for urllib3 and requests. It does not require enabling APM instrumentation for urllib3 anymore.
  • profiling
    • Add support for threading.RLock (reentrant lock) profiling. The Lock profiler now tracks both threading.Lock and threading.RLock usage, providing comprehensive lock contention visibility for Python applications.
  • LLM Observability
    • Previous dataset versions can be optionally pulled by passing the version argument to LLMObs.pull_dataset
    • Datasets have new properties version and latest_version to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
    • This fix resolves performance issue affecting coverage collection for Python 3.12+
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • add support for HTTPS_PROXY.
    • Resolves an issue in the bedrock integration where invoking cohere rerank models would result in missing spans due to output formatting index errors.
    • Corrected the description of the assessment argument in submit_evaluation().
    • Resolves an issue where the langchain integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
    • DD_PROFILING_API_TIMEOUT doesn't have any effect, and is marked to be removed in upcoming 4.0 release. New environment variable DD_PROFILING_API_TIMEOUT_MS is introduced to configure timeout for uploading profiles to the backend. The default value is 10000 ms (10 seconds)
    • Upgrades echion to resolve an issue where stack profiler can allocate a large amount of memory unnecessarily. Resolves another issue where the profiler can loop infinitely on Python 3.13.
    • This fix resolves an issue where AssertionError exceptions were silently suppressed in the _acquire method of the Lock profiler (note: this only occurs when assertions are enabled.)
  • kafka
    • This fix resolves an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages
  • langchain
    • This fix resolves an issue where auto instrumented prompt templates incorrectly included a version field. The version field is now omitted unless explicitly set by the user. assessment now refers to whether the evaluation itself passes or fails according to your application, rather than the validity of the evaluation result. The langchain integration will trace Azure OpenAI spans as workflow spans if there is an equivalent llm span from the openai integration.
    • Fixes an issue where streamed responses that end before the first chunk is received would result in an IndexError.
  • openai
    • This fix resolves an issue where using async iteration with paginated methods (e.g., async for model in client.models.list()) caused a TypeError: 'async for' requires an object with __aiter__ method, got coroutine. See issue #14574.
  • opentelemetry
    • Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
    • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace. ddtrace internal connections (gRPC and HTTP) are now excluded from tracing to prevent circular instrumentation.
  • pytest plugin
    • fix for potential KeyError exceptions in test runs when gevent is detected within the environment.
  • code origin
    • ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • ray
    • This fix resolves an issue where the tracer raised an error when submitting Ray tasks without explicitly calling ray.init().
    • This fix resolves an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
    • This fix stops instrumenting internal Ray actors (those starting with underscore) that were causing excessive noise, and adds ray.data._internal to the module denylist.
  • IAST
    • Fixed an issue where using weak hashing or cipher algorithms outside of a request context (e.g., during application startup) could raise an unhandled exception. The fix ensures proper error handling when IAST operations are performed without an active request context.
  • tracer
    • This fix resolves an issue where an application instrumented by ddtrace could crash at start. Fix compatibility with zope.event==6.0
    • This fix ensures compatibility with wrapt 2.0.0
  • logging
    • Fixed ddtrace internal logging when trace-log correlation is disabled. Prevents ValueError: Formatting field not found in record: 'dd.service'.
  • Other
    • Fix a potential race condition in the tracer.
    • Fix the Python Detector regular expression so it also detects paths ending with only the major version number.
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.
Nov 18, 2025

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

Upgrade Notes

  • profiling
    • This updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.

Deprecation Notes

  • tracing
    • Span.finished setter is deprecated, use Span.finish() method instead.
    • Span.finish_with_ancestors() is deprecated with no alternative.
  • LLM Observability
    • The ExperimentResult class' rows and summary_evaluations attributes are deprecated and will be removed in the next major release. ExperimentResult.rows/summary_evaluations attributes will only store the results of the first run iteration for multi-run experiments. Use the ExperimentResult.runs attribute instead to access experiment results and summary evaluations.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
  • LLM Observability
    • Experiments can now be run multiple times by using the optional runs argument, to assess the true performance of an experiment in the face of the non determinism of LLMs. Use the new ExperimentResult class' runs attribute to access the results and summary evaluations by run iteration.
    • Non-root experiment spans are now tagged with experiment ID, run ID, and run iteration tags.
    • Adds additional tags to MCP client session and tool call spans to power LLM Observability MCP tool call features.
  • mcp
    • Marks client mcp tool call spans as errors when the corresponding server tool call errored

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • Add support for HTTPS_PROXY.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
  • other
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.
Nov 14, 2025

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

This is a major-version release that contains many backwards-incompatible changes to public APIs. To find which of these your code relies on, follow the "deprecation warnings" instructions here.

dd-trace-py now includes an OpenFeature provider implementation, enabling feature flag evaluation through the OpenFeature API.

This integration is under active design and development. Functionality and APIs are experimental and may change without notice. For more information, see the Datadog documentation at https://docs.datadoghq.com/feature_flags/#overview

Breaking Changes

  • Support for ddtrace with Python 3.8 is removed after being deprecated in the 3.0 release line. Use ddtrace 4.x with Python 3.9 or newer.
  • 32-bit linux is no longer supported. Please contact us if this blocks upgrading dd-trace-py.
  • mongoengine
    • Drops support for the ddtrace.Pin object with mongoengine. With this change, the ddtrace library no longer directly supports mongoengine. Mongoengine will be supported through the pymongo integration.
  • CI Visibility
    • Removed deprecated entry points for the pytest_benchmark and pytest_bdd integrations. These plugins are now supported by the regular pytest integration.
  • dynamic instrumentation
    • removed the deprecated DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL variable.
  • exception replay
    • removed the deprecated DD_EXCEPTION_DEBUGGING_ENABLED variable.
  • tracing
    • Deprecated methods have been removed
      • Span.set_tag_str has been removed, use Span.set_tag instead.
      • Span.set_struct_tag has been removed.
      • Span.get_struct_tag has been removed.
      • Span._pprint has been removed
      • Span.finished setter was removed, please use Span.finish() method instead.
      • Tracer.on_start_span method has been removed.
      • Tracer.deregister_on_start_span method has been removed.
      • ddtrace.trace.Pin has been removed.
      • Span.finish_with_ancestors was removed with no replacement.
    • Some methods have had their type signatures changed
      • Span.set_tag typing is now set_tag(key: str, value: Optional[str] = None) -> None
      • Span.get_tag typing is now get_tag(key: str) -> Optional[str]
      • Span.set_tags typing is now set_tags(tags: dict[str, str]) -> None
      • Span.get_tags typing is now get_tags() -> dict[str, str]
      • Span.set_metric typing is now set_metric(key: str, value: int | float) -> None
      • Span.get_metric typing is now get_metric(key: str) -> Optional[int | float]
      • Span.set_metrics typing is now set_metrics(metrics: Dict[str, int | float]) -> None
      • Span.get_metrics typing is now get_metrics() -> dict[str, int | float]
    • Span.record_exception's timestamp and escaped parameters are removed
  • LLM Observability
    • manual instrumentation methods, including LLMObs.annotate(), LLMObs.export_span(), LLMObs.submit_evaluation(), LLMObs.inject_distributed_headers(), and LLMObs.activate_distributed_headers() now raise exceptions instead of logging. LLM Observability auto-instrumentation is not affected.
    • LLMObs.submit_evaluation_for() has been removed. Please use LLMObs.submit_evaluation() instead for submitting evaluations. To migrate:
      • LLMObs.submit_evaluation_for(...) users: rename to LLMObs.submit_evaluation(...)
      • LLMObs.submit_evaluation_for(...) users: rename the span_context argument to span, i.e. LLMObs.submit_evaluation(span_context={"span_id": ..., "trace_id": ...}, ...) to LLMObs.submit_evaluation(span={"span_id": ..., "trace_id": ...}, ...)
  • profiling
    • this updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.
    • The V1 stack profiler is removed. V2 has been enabled by default since v2.20.0. DD_PROFILING_STACK_V2_ENABLED is now removed.
  • freezegun
    • The deprecated freezegun integration is now removed.
  • opentracer
    • This change removes the deprecated opentracer package
  • aioredis
    • The aioredis integration has been removed.
  • google_generativeai
    • The google_generativeai integration has been removed as the google_generativeai library has reached end-of-life. As an alternative, you can use the recommended google_genai library and corresponding integration instead.
  • openai
    • Streamed chat/completions will no longer have token counts computed using the tiktoken library, and instead will default to having their token counts estimated if not explicitly provided in the OpenAI response object. To guarantee accurate streamed token metrics, set stream_options={"include_usage": True} in the OpenAI request.
  • django
    • This upgrades the default tracing behavior to enable minimal tracing mode by default (DD_DJANGO_TRACING_MINIMAL now defaults to true). Django ORM, cache, and template instrumentation are disabled by default to eliminate duplicate span creation since library integrations for database drivers (psycopg, MySQLdb, sqlite3), cache clients (redis, memcached), template renderers (Jinja2), and other supported libraries continue to be traced. This reduces performance overhead by removing redundant Django-layer instrumentation. To restore all Django instrumentation, set DD_DJANGO_TRACING_MINIMAL=false, or enable individual features using DD_DJANGO_INSTRUMENT_DATABASES=true, DD_DJANGO_INSTRUMENT_CACHES=true, and DD_DJANGO_INSTRUMENT_TEMPLATES=true.
    • When DD_DJANGO_INSTRUMENT_DATABASES=true (default false), database instrumentation now merges Django-specific tags into database driver spans created by supported integrations (psycopg, sqlite3, MySQLdb, etc.) instead of creating duplicate Django database spans. If the database cursor is not already wrapped by a supported integration, Django wraps it and creates a span. This change reduces overhead and duplicate spans while preserving visibility into database operations.
  • Other
    • This change removes the ddtrace.settings package. Environment variables should be used to adjust settings.
    • This change removes the deprecated non_active_span parameter to HttpPropagator.inject
    • This change removes the deprecated environment variable DEFAULT_RUNTIME_METRICS_INTERVAL.

Deprecation Notes

  • Support for ddtrace with Python 3.9 is deprecated after Python 3.9 reached its end-of-life.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
    • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known. API Security reuses the endpoint inferred by the trace resource renaming feature or recomputes it when it is not available to perform sampling instead.
    • AppSec instrumentation for downstream request is now enabled by default for urllib3 and requests. It does not require enabling APM instrumentation for urllib3 anymore.
  • profiling
    • Add support for threading.RLock (reentrant lock) profiling. The Lock profiler now tracks both threading.Lock and threading.RLock usage, providing comprehensive lock contention visibility for Python applications.
  • LLM Observability
    • Previous dataset versions can be optionally pulled by passing the version argument to LLMObs.pull_dataset
    • Datasets have new properties version and latest_version to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
    • This fix resolves performance issue affecting coverage collection for Python 3.12+
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • add support for HTTPS_PROXY.
    • Resolves an issue in the bedrock integration where invoking cohere rerank models would result in missing spans due to output formatting index errors.
    • Corrected the description of the assessment argument in submit_evaluation().
    • Resolves an issue where the langchain integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • dynamic instrumentation
    • fix issue with line probes matching the wrong source file when multiple source files from different Python path entries share the same name.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
    • DD_PROFILING_API_TIMEOUT doesn't have any effect, and is marked to be removed in upcoming 4.0 release. New environment variable DD_PROFILING_API_TIMEOUT_MS is introduced to configure timeout for uploading profiles to the backend. The default value is 10000 ms (10 seconds)
    • Upgrades echion to resolve an issue where stack profiler can allocate a large amount of memory unnecessarily. Resolves another issue where the profiler can loop infinitely on Python 3.13.
    • This fix resolves an issue where AssertionError exceptions were silently suppressed in the _acquire method of the Lock profiler (note: this only occurs when assertions are enabled.)
  • kafka
    • This fix resolves an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages
  • langchain
    • This fix resolves an issue where auto instrumented prompt templates incorrectly included a version field. The version field is now omitted unless explicitly set by the user. assessment now refers to whether the evaluation itself passes or fails according to your application, rather than the validity of the evaluation result. The langchain integration will trace Azure OpenAI spans as workflow spans if there is an equivalent llm span from the openai integration.
    • Fixes an issue where streamed responses that end before the first chunk is received would result in an IndexError.
  • openai
    • This fix resolves an issue where using async iteration with paginated methods (e.g., async for model in client.models.list()) caused a TypeError: 'async for' requires an object with __aiter__ method, got coroutine. See issue #14574.
  • opentelemetry
    • Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
    • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace. ddtrace internal connections (gRPC and HTTP) are now excluded from tracing to prevent circular instrumentation.
  • pytest plugin
    • fix for potential KeyError exceptions in test runs when gevent is detected within the environment.
  • code origin
    • ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • ray
    • This fix resolves an issue where the tracer raised an error when submitting Ray tasks without explicitly calling ray.init().
    • This fix resolves an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
    • This fix stops instrumenting internal Ray actors (those starting with underscore) that were causing excessive noise, and adds ray.data._internal to the module denylist.
  • IAST
    • Fixed an issue where using weak hashing or cipher algorithms outside of a request context (e.g., during application startup) could raise an unhandled exception. The fix ensures proper error handling when IAST operations are performed without an active request context.
  • tracer
    • This fix resolves an issue where an application instrumented by ddtrace could crash at start. Fix compatibility with zope.event==6.0
    • This fix ensures compatibility with wrapt 2.0.0
  • logging
    • Fixed ddtrace internal logging when trace-log correlation is disabled. Prevents ValueError: Formatting field not found in record: 'dd.service'.
  • Other
    • Fix a potential race condition in the tracer.
    • Fix the Python Detector regular expression so it also detects paths ending with only the major version number.
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.
Nov 13, 2025

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

This is a major-version release that contains many backwards-incompatible changes to public APIs. To find which of these your code relies on, follow the "deprecation warnings" instructions here.

Breaking Changes

  • Support for ddtrace with Python 3.8 is removed after being deprecated in the 3.0 release line. Use ddtrace 4.x with Python 3.9 or newer.
  • mongoengine
    • Drops support for the ddtrace.Pin object with mongoengine. With this change, the ddtrace library no longer directly supports mongoengine. Mongoengine will be supported through the pymongo integration.
  • CI Visibility
    • Removed deprecated entry points for the pytest_benchmark and pytest_bdd integrations. These plugins are now supported by the regular pytest integration.
  • dynamic instrumentation
    • removed the deprecated DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL variable.
  • exception replay
    • removed the deprecated DD_EXCEPTION_DEBUGGING_ENABLED variable.
  • tracing
    • Deprecated methods have been removed
      • Span.set_tag_str has been removed, use Span.set_tag instead.
      • Span.set_struct_tag has been removed.
      • Span.get_struct_tag has been removed.
      • Span._pprint has been removed
      • Span.finished setter was removed, please use Span.finish() method instead.
      • Tracer.on_start_span method has been removed.
      • Tracer.deregister_on_start_span method has been removed.
      • ddtrace.trace.Pin has been removed.
      • Span.finish_with_ancestors was removed with no replacement.
    • Some methods have had their type signatures changed
      • Span.set_tag typing is now set_tag(key: str, value: Optional[str] = None) -> None
      • Span.get_tag typing is now get_tag(key: str) -> Optional[str]
      • Span.set_tags typing is now set_tags(tags: dict[str, str]) -> None
      • Span.get_tags typing is now get_tags() -> dict[str, str]
      • Span.set_metric typing is now set_metric(key: str, value: int | float) -> None
      • Span.get_metric typing is now get_metric(key: str) -> Optional[int | float]
      • Span.set_metrics typing is now set_metrics(metrics: Dict[str, int | float]) -> None
      • Span.get_metrics typing is now get_metrics() -> dict[str, int | float]
    • Span.record_exception's timestamp and escaped parameters are removed
  • LLM Observability
    • manual instrumentation methods, including LLMObs.annotate(), LLMObs.export_span(), LLMObs.submit_evaluation(), LLMObs.inject_distributed_headers(), and LLMObs.activate_distributed_headers() now raise exceptions instead of logging. LLM Observability auto-instrumentation is not affected.
    • LLMObs.submit_evaluation_for() has been removed. Please use LLMObs.submit_evaluation() instead for submitting evaluations. To migrate:
      • LLMObs.submit_evaluation_for(...) users: rename to LLMObs.submit_evaluation(...)
      • LLMObs.submit_evaluation_for(...) users: rename the span_context argument to span, i.e. LLMObs.submit_evaluation(span_context={"span_id": ..., "trace_id": ...}, ...) to LLMObs.submit_evaluation(span={"span_id": ..., "trace_id": ...}, ...)
  • profiling
    • this updates echion (the Python stack sampler) to the latest version, which introduces an experimental faster memory copy function.
    • The V1 stack profiler is removed. V2 has been enabled by default since v2.20.0. DD_PROFILING_STACK_V2_ENABLED is now removed.
  • freezegun
    • The deprecated freezegun integration is now removed.
  • opentracer
    • This change removes the deprecated opentracer package
  • google_generativeai
    • The google_generativeai integration has been removed as the google_generativeai library has reached end-of-life. As an alternative, you can use the recommended google_genai library and corresponding integration instead.
  • openai
    • Streamed chat/completions will no longer have token counts computed using the tiktoken library, and instead will default to having their token counts estimated if not explicitly provided in the OpenAI response object. To guarantee accurate streamed token metrics, set stream_options={"include_usage": True} in the OpenAI request.
  • django
    • This upgrades the default tracing behavior to enable minimal tracing mode by default (DD_DJANGO_TRACING_MINIMAL now defaults to true). Django ORM, cache, and template instrumentation are disabled by default to eliminate duplicate span creation since library integrations for database drivers (psycopg, MySQLdb, sqlite3), cache clients (redis, memcached), template renderers (Jinja2), and other supported libraries continue to be traced. This reduces performance overhead by removing redundant Django-layer instrumentation. To restore all Django instrumentation, set DD_DJANGO_TRACING_MINIMAL=false, or enable individual features using DD_DJANGO_INSTRUMENT_DATABASES=true, DD_DJANGO_INSTRUMENT_CACHES=true, and DD_DJANGO_INSTRUMENT_TEMPLATES=true.
    • When DD_DJANGO_INSTRUMENT_DATABASES=true (default false), database instrumentation now merges Django-specific tags into database driver spans created by supported integrations (psycopg, sqlite3, MySQLdb, etc.) instead of creating duplicate Django database spans. If the database cursor is not already wrapped by a supported integration, Django wraps it and creates a span. This change reduces overhead and duplicate spans while preserving visibility into database operations.
  • Other
    • This change removes the ddtrace.settings package. Environment variables should be used to adjust settings.
    • This change removes the deprecated non_active_span parameter to HttpPropagator.inject
    • This change removes the deprecated environment variable DEFAULT_RUNTIME_METRICS_INTERVAL.

Deprecation Notes

  • Support for ddtrace with Python 3.9 is deprecated after Python 3.9 reached its end-of-life.

New Features

  • AAP
    • This introduces security response id for easy identification of blocking responses.
    • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known. API Security reuses the endpoint inferred by the trace resource renaming feature or recomputes it when it is not available to perform sampling instead.
    • AppSec instrumentation for downstream request is now enabled by default for urllib3 and requests. It does not require enabling APM instrumentation for urllib3 anymore.
  • profiling
    • Add support for threading.RLock (reentrant lock) profiling. The Lock profiler now tracks both threading.Lock and threading.RLock usage, providing comprehensive lock contention visibility for Python applications.
  • LLM Observability
    • Previous dataset versions can be optionally pulled by passing the version argument to LLMObs.pull_dataset
    • Datasets have new properties version and latest_version to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

Bug Fixes

  • CI Visibility
    • This fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.
    • This fix resolves performance issue affecting coverage collection for Python 3.12+
  • data_streams
    • This fix resolves an issue where payload size statistics were not being sent to the backend for Data Streams Monitoring (DSM).
  • core
    • This fix resolves an issue where forksafe locks used patched threading primitives from the profiling module, causing performance issues. The forksafe module now uses unpatched threading primitives (Lock, RLock, Event).
  • LLM Observability
    • add support for HTTPS_PROXY.
    • Resolves an issue in the bedrock integration where invoking cohere rerank models would result in missing spans due to output formatting index errors.
    • Corrected the description of the assessment argument in submit_evaluation().
    • Resolves an issue where the langchain integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled.
  • Error Tracking
    • Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.
  • profiling
    • This fix resolves an issue where importing the profiler module after an asyncio Event Loop had been started would make the Profiler blind to the existing Event Loop and its Tasks.
    • DD_PROFILING_API_TIMEOUT doesn't have any effect, and is marked to be removed in upcoming 4.0 release. New environment variable DD_PROFILING_API_TIMEOUT_MS is introduced to configure timeout for uploading profiles to the backend. The default value is 10000 ms (10 seconds)
    • Upgrades echion to resolve an issue where stack profiler can allocate a large amount of memory unnecessarily. Resolves another issue where the profiler can loop infinitely on Python 3.13.
    • This fix resolves an issue where AssertionError exceptions were silently suppressed in the _acquire method of the Lock profiler (note: this only occurs when assertions are enabled.)
  • kafka
    • This fix resolves an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages
  • langchain
    • This fix resolves an issue where auto instrumented prompt templates incorrectly included a version field. The version field is now omitted unless explicitly set by the user. assessment now refers to whether the evaluation itself passes or fails according to your application, rather than the validity of the evaluation result. The langchain integration will trace Azure OpenAI spans as workflow spans if there is an equivalent llm span from the openai integration.
    • Fixes an issue where streamed responses that end before the first chunk is received would result in an IndexError.
  • openai
    • This fix resolves an issue where using async iteration with paginated methods (e.g., async for model in client.models.list()) caused a TypeError: 'async for' requires an object with __aiter__ method, got coroutine. See issue #14574.
  • opentelemetry
    • Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
    • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace. ddtrace internal connections (gRPC and HTTP) are now excluded from tracing to prevent circular instrumentation.
  • pytest plugin
    • fix for potential KeyError exceptions in test runs when gevent is detected within the environment.
  • code origin
    • ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • ray
    • This fix resolves an issue where the tracer raised an error when submitting Ray tasks without explicitly calling ray.init().
    • This fix resolves an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
    • This fix stops instrumenting internal Ray actors (those starting with underscore) that were causing excessive noise, and adds ray.data._internal to the module denylist.
  • IAST
    • Fixed an issue where using weak hashing or cipher algorithms outside of a request context (e.g., during application startup) could raise an unhandled exception. The fix ensures proper error handling when IAST operations are performed without an active request context.
  • tracer
    • This fix resolves an issue where an application instrumented by ddtrace could crash at start. Fix compatibility with zope.event==6.0
    • This fix ensures compatibility with wrapt 2.0.0
  • logging
    • Fixed ddtrace internal logging when trace-log correlation is disabled. Prevents ValueError: Formatting field not found in record: 'dd.service'.
  • Other
    • Fix a potential race condition in the tracer.
    • Fix the Python Detector regular expression so it also detects paths ending with only the major version number.
    • Prevent a potential ResourceWarning in multiprocess scenarios.
    • Prevent startup failure when a temporary directory is not available.

Other Changes

  • profiling
    • This removes the wrapt library dependency from the Lock Profiler implementation, improving performance and reducing overhead during lock instrumentation.
Nov 7, 2025

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

Bug Fixes

  • CI Visibility: this fix resolves an issue where repo tags would be fetched while unshallowing to extract commit metadata, causing performance issues for repos with a large number of tags.

  • LLM Observability: fix support for HTTPS_PROXY.

  • Error Tracking: Modifies the way exception events are stored such that the exception id is stored instead of the exception object, to prevent TypeErrors with custom exception objects.

Nov 5, 2025

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

Upgrade Notes

  • openai: Streamed chat/completions will no longer have token counts computed using the tiktoken library, and instead
    will default to having their token counts estimated if not explicitly provided in the OpenAI response object. To guarantee accurate streamed token metrics, set stream_options={"include_usage": True} in the OpenAI request.

Deprecation Notes

  • tracing
    • Span.set_struct_tag is deprecated and will be removed in v4.0.0 with no direct replacement.
    • Span.get_struct_tag is deprecated and will be removed in v4.0.0 with no direct replacement.
    • Span.set_tag_str is deprecated and will be removed in version 4.0.0. As an alternative to Span.set_tag_str, you can use Span.set_tag instead.
  • profiling: The V1 stack profiler is deprecated and will be removed in 4.0. V2 has been enabled by default since v2.20.0. DD_PROFILING_STACK_V2_ENABLED=false will no longer have an effect starting in 4.0.

New Features

  • AAP
    • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known. API Security reuses the endpoint inferred by the trace resource renaming feature or recomputes it when it is not available to perform sampling instead.
    • AppSec instrumentation for downstream request is now enabled by default for urllib3 and requests. It does not require enabling APM instrumentation for urllib3 anymore.
  • profiling: Add support for threading.RLock (reentrant lock) profiling. The Lock profiler now tracks both threading.Lock and threading.RLock usage, providing comprehensive lock contention visibility for Python applications.
  • LLM Observability
    • Previous dataset versions can be optionally pulled by passing the version argument to LLMObs.pull_dataset
    • Datasets have new properties version and latest_version to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

Bug Fixes

  • CI Visibility: This fix resolves performance issue affecting coverage collection for Python 3.12+
  • kafka: This fix resolves an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages
  • langchain
    • This fix resolves an issue where auto instrumented prompt templates incorrectly included a version field. The version field is now omitted unless explicitly set by the user.
    • Fixes an issue where streamed responses that end before the first chunk is received would result in an IndexError.
  • LLM Observability
    • Corrected the description of the assessment argument in submit_evaluation(). assessment now refers to whether the evaluation itself passes or fails according to your application, rather than the validity of the evaluation result.
    • Resolves an issue in the bedrock integration where invoking cohere rerank models would result in missing spans due to output formatting index errors.
    • Resolves an issue where the langchain integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled. The langchain integration will trace Azure OpenAI spans as workflow spans if there is an equivalent llm span from the openai integration.
  • openai: This fix resolves an issue where using async iteration with paginated methods (e.g., async for model in client.models.list()) caused a TypeError: 'async for' requires an object with __aiter__ method, got coroutine. See issue #14574.
  • pytest plugin: fix for potential KeyError exceptions in test runs when gevent is detected within the environment.
  • code origin: ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • ray
    • This fix resolves an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
    • This fix resolves an issue where the tracer raised an error when submitting Ray tasks without explicitly calling ray.init().
    • This fix stops instrumenting internal Ray actors (those starting with underscore) that were causing excessive noise, and adds ray.data._internal to the module denylist.
  • IAST: Fixed an issue where using weak hashing or cipher algorithms outside of a request context (e.g., during application startup) could raise an unhandled exception. The fix ensures proper error handling when IAST operations are performed without an active request context.
  • otel
    • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace. ddtrace internal connections (gRPC and HTTP) are now excluded from tracing to prevent circular instrumentation.
    • Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
  • Fix a potential race condition in the tracer.
  • profiling
    • This fix resolves an issue where AssertionError exceptions were silently suppressed in the _acquire method of the Lock profiler (note: this only occurs when assertions are enabled.)
    • DD_PROFILING_API_TIMEOUT doesn't have any effect, and is marked to be removed in upcoming 4.0 release. New environment variable DD_PROFILING_API_TIMEOUT_MS is introduced to configure timeout for uploading profiles to the backend. The default value is 10000 ms (10 seconds)
    • Upgrades echion to resolve an issue where stack profiler can allocate a large amount of memory unnecessarily. Resolves another issue where the profiler can loop infinitely on Python 3.13.
  • Fix the Python Detector regular expression so it also detects paths ending with only the major version number.
  • logging: Fixed ddtrace internal logging when trace-log correlation is disabled. Prevents ValueError: Formatting field not found in record: 'dd.service'.
  • tracer
    • This fix ensures compatibility with wrapt 2.0.0
    • This fix resolves an issue where an application instrumented by ddtrace could crash at start. Fix compatibility with zope.event==6.0
Latest
v4.7.1
Tracking Since
Sep 4, 2025
Last checked Apr 21, 2026