Releases: DataDog/dd-trace-py
3.14.2
Estimated end-of-life date, accurate to within three months: 09-2026
See the support level definitions for more information.
Bug Fixes
- sampling: This change prevents the DatadogSampler from getting recreated whenever the SpanAggregator is reset, and
instead updates the rate limiter that the sampler uses.
- dynamic instrumentation: fix an issue that prevented multiple probes on the same location from being instrumented.
- source code integration: check that
DD_GIT_COMMIT_SHA
andDD_GIT_REPOSITORY_URL
are defined before using the git command.
3.13.3
Estimated end-of-life date, accurate to within three months: 09-2026
See the support level definitions for more information.
Bug Fixes
-
sampling: This change prevents the DatadogSampler from getting recreated whenever the SpanAggregator is reset, and instead updates the rate limiter that the sampler uses.
-
source code integration: check that
DD_GIT_COMMIT_SHA
andDD_GIT_REPOSITORY_URL
are defined before using the git command. -
CI Visibility: This fix resolves an issue where coverage from sessions with pytest-xdist were not submitted with the proper session id, preventing Test Impact Analysis feature from working properly.
3.12.8
Estimated end-of-life date, accurate to within three months: 09-2026
See the support level definitions for more information.
Bug Fixes
- exception replay: fixed an issue that prevented snapshots from retrieving local variables from traceback frames from exception thrown by Celery tasks.
- source code integration: check that
DD_GIT_COMMIT_SHA
andDD_GIT_REPOSITORY_URL
are defined before using the git command.
3.14.1
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
Bug Fixes
- AAP:
- This fix disables grpc threat monitoring, as it could generate false positives.
3.14.0
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
New Features
- ai_guard
- add AI Guard evaluations support to LangChain instrumentation
- add evaluation support to streaming LangChain APIs
- LLM Observability
ml_app
is now optional, defaulting toservice
. while it is still recommended to setml_app
, enabling LLM Observability will no longer throw if one is not provided or propagated from an upstream service.- This introduces a
tool_definitions
parameter to theLLMObs.annotate()
method for tool calling scenarios. Users can now pass a list of tool definition dictionaries directly to annotate LLM spans with available tools. Each tool definition must include aname
(string) field, with optionaldescription
(string) andschema
(JSON-serializable dictionary) fields. - Experiments (beta) dataset methods (
create_dataset
,create_dataset_from_csv
andpull_dataset
) argumentname
is changed todataset_name
.
Bug Fixes
- AAP
- make sure the status code for downstream requests is properly sent to libddwaf.
- Resolves an incompatibility with gevent>=25.8.1 that would cause a deadlock when starting the waf via remote config.
- django: Fixes issue causing
ValueError: coroutine already executing
on Python 3.13+ withdjango.utils.decorators.async_only_middleware
. - asyncpg: Fix the error
"Error: expected pool connect callback to return an instance of 'asyncpg.connection.Connection', got 'ddtrace.contrib.internal.asyncpg.patch._TracedConnection'"
due to using the custom connect option. With this fix, postgres.connect spans will be created when this option is used. - exception replay: fixed an issue that prevented snapshots from retrieving local variables from traceback frames from exception thrown by Celery tasks.
- LLM Observability
- This fix resolves an issue where decorated functions returning responses with an ambiguous truth value (e.g. pandas dataframes) would raise an error due to the inability to coerce the value into a boolean.
- Fixes an issue where certain Google GenAI LLM requests were not being traced due to importing from google.genai.types on startup.
- Fixed an issue that could have caused some products to fail to start properly in applications that use
pkg_resources
, either directly or indirectly. - profiling: Upgrades echion to pick up critical bug fixes and performance improvements.
- CI Visibility: This fix resolves an issue where coverage from sessions with pytest-xdist were not submitted with the proper session id, preventing Test Impact Analysis feature from working properly.
3.14.0rc2
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
New Features
- ai_guard
- add AI Guard evaluations support to LangChain instrumentation
- add evaluation support to streaming LangChain APIs
- LLM Observability
ml_app
is now optional, defaulting toservice
. while it is still recommended to setml_app
, enabling LLM Observability will no longer throw if one is not provided or propagated from an upstream service.- This introduces a
tool_definitions
parameter to theLLMObs.annotate()
method for tool calling scenarios. Users can now pass a list of tool definition dictionaries directly to annotate LLM spans with available tools. Each tool definition must include aname
(string) field, with optionaldescription
(string) andschema
(JSON-serializable dictionary) fields. - Experiments (beta) dataset methods (
create_dataset
,create_dataset_from_csv
andpull_dataset
) argumentname
is changed todataset_name
.
Bug Fixes
- AAP
- make sure the status code for downstream requests is properly sent to libddwaf.
- Resolves an incompatibility with gevent>=25.8.1 that would cause a deadlock when starting the waf via remote config.
- django: Fixes issue causing
ValueError: coroutine already executing
on Python 3.13+ withdjango.utils.decorators.async_only_middleware
. - asyncpg: Fix the error
"Error: expected pool connect callback to return an instance of 'asyncpg.connection.Connection', got 'ddtrace.contrib.internal.asyncpg.patch._TracedConnection'"
due to using the custom connect option. With this fix, postgres.connect spans will be created when this option is used. - exception replay: fixed an issue that prevented snapshots from retrieving local variables from traceback frames from exception thrown by Celery tasks.
- LLM Observability
- This fix resolves an issue where decorated functions returning responses with an ambiguous truth value (e.g. pandas dataframes) would raise an error due to the inability to coerce the value into a boolean.
- Fixes an issue where certain Google GenAI LLM requests were not being traced due to importing from google.genai.types on startup.
- Fixed an issue that could have caused some products to fail to start properly in applications that use
pkg_resources
, either directly or indirectly. - profiling: Upgrades echion to pick up critical bug fixes and performance improvements.
- CI Visibility: This fix resolves an issue where coverage from sessions with pytest-xdist were not submitted with the proper session id, preventing Test Impact Analysis feature from working properly.
3.12.7
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
Bug Fixes
- tracing:
- Fixes a bug where calling
__repr__
onSpanPointer
objected raised anAttributeError
. This caused aws_lambdas to crash when debug logging was enabled.
- Fixes a bug where calling
3.13.1
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
Bug Fixes
- django:
- Fixes issue causing
ValueError: coroutine already executing
on Python 3.13+ withdjango.utils.decorators.async_only_middleware
.
- Fixes issue causing
3.14.0rc1
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
New Features
- ai_guard: add AI Guard evaluations support to LangChain instrumentation
- LLM Observability
ml_app
is now optional, defaulting toservice
. while it is still recommended to setml_app
, enabling LLM Observability will no longer throw if one is not provided or propagated from an upstream service.- This introduces a
tool_definitions
parameter to theLLMObs.annotate()
method for tool calling scenarios. Users can now pass a list of tool definition dictionaries directly to annotate LLM spans with available tools. Each tool definition must include aname
(string) field, with optionaldescription
(string) andschema
(JSON-serializable dictionary) fields.
Bug Fixes
- asyncpg: Fix the error
"Error: expected pool connect callback to return an instance of 'asyncpg.connection.Connection', got 'ddtrace.contrib.internal.asyncpg.patch._TracedConnection'"
due to using the custom connect option. With this fix, postgres.connect spans will be created when this option is used. - exception replay: fixed an issue that prevented snapshots from retrieving local variables from traceback frames from exception thrown by Celery tasks.
- LLM Observability: This fix resolves an issue where decorated functions returning responses with an ambiguous truth value (e.g. pandas dataframes) would raise an error due to the inability to coerce the value into a boolean.
- Fixed an issue that could have caused some products to fail to start properly in applications that use
pkg_resources
, either directly or indirectly. - profiling: Upgrades echion to pick up critical bug fixes and performance improvements.
- CI Visibility: This fix resolves an issue where coverage from sessions with pytest-xdist were not submitted with the proper session id, preventing Test Impact Analysis feature from working properly.
3.13.0
Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.
Deprecation Notes
- tracing:
ddtrace.tracer.Pin
is deprecated and will be removed in version 4.0.0. To manage configuration of the tracer or integrations please use environment variables.
New Features
-
opentelemetry
- Adds experimental support for exporting logs using the OTLP protocol. To enable this feature install the
opentelemetry-otlp-exporter
and setDD_LOGS_OTEL_ENABLED=true
. - Ensures that ddtrace log injection is disabled when OpenTelemetry logs are enabled (DD_LOGS_OTEL_ENABLED=true).
- Adds experimental support for exporting logs using the OTLP protocol. To enable this feature install the
-
LLM Observability
- Adds support for collecting tool definitions, tool calls and tool results in the Amazon Bedrock integration.
- Adds support for collecting tool definitions, tool calls and tool results in the Google GenAI integration.
- This introduces support for tool calls and tool results in LLMObs message annotations when using custom instrumentation. The
LLMObs.annotate()
method now accept input and output data with optionalto ol_calls
andtool_results
fields for function calling scenarios. - Adds support for collecting tool definitions, tool calls and tool results in the OpenAI integration.
- Adds support for collecting tool definitions, tool calls and tool results in the VertexAI integration.
-
Django: Added the
DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS
config option (default:true
).When enabled, the Django integration always generates a database span for every operation, even if the underlying database engine is already instrumented. This ensures complete coverage but may produce duplicat
e spans and extra overhead.When disabled, spans are only created if the database engine is not instrumented.
To avoid multiple spans per database call, we recommend disabling this option.
DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS=false
-
AAP
- This introduces endpoint discovery for Flask applications. It allows the collection of API endpoints of a Flask application at startup.
- This introduces endpoint discovery for FastAPI applications. It allows the collection of API endpoints of a FastAPI application at startup.
-
Bug Fixes
-
AAP: Fixes an issue where security signals would be incorrectly reported on an inferred proxy service instead of the current service.
-
CI Visibility: This fix resolves an issue where the
pytest
plugin would hold a reference to test exceptions beyond the end of the test, preventing them from being garbage-collected and increasing memory usage. -
psycopg: This fix resolves a potential circular import with the psycopg3 contrib.
-
internal: This fix resolves an issue where the tracer flare was not sent when
DD_TRACE_AGENT_URL
was not set, as the default URL was not used. -
tracing
- Fixes issue with
websocket.receive
span not closing exactly when anotherwebsocket.receive
span was opened. - Fixes duration of websocket handshake span such that the handshake span closes when the connection is upgraded.
- Fix where
websocket.close
parent should be the handshake span when configuration is disabled. - Resolves an issue where calling
ddtrace.trace.tracer.configure(...)
resets the trace writer buffer, causing spans to be dropped.
- Fixes issue with
-
Code Security: Fixed a crash in the taint-aware modulo aspect when formatting SQLAlchemy objects whose
__repr__
can raise (e.g., inside complex CASE expressions). -
LLM Observability: Properly parse
DD_TAGS
onto LLM Observability span events' tags. -
sampling
- Fixed a bug where single span sampling rules were completely ignored when stats computation was enabled, causing all single-sampled spans to be dropped. Note that single span sampling is only used to
override trace sampling decisions to keep a span where the trace will be dropped. - Removed automatic setting of local trace sampling rule tag (
_dd.p.dm=-3
) during distributed tracing header extraction.
- Fixed a bug where single span sampling rules were completely ignored when stats computation was enabled, causing all single-sampled spans to be dropped. Note that single span sampling is only used to
-
ssi, crashtracker: This fix resolves an issue where crashtracker receiver binary was not available in an injected environment.
Other Changes
- LLM Observability: add ability to override the URL origin.
- openai: Removes I/O tags, including llm prompts, parameters, and token usage, from APM spans for OpenAI audio, image, and moderation requests.