NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI, #486 most downloaded on PyPI
Datadog APM client library
Latest stable
4.17.2
Last release 3 days ago
19 Nov 2026
Ships on a steady schedule
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
5 versions withdrawn
withdrawn after publishing
10 years old
871 releases · first in 2017
Drag across the ruler to compare, or tap a release to open it.
We have added support for logs injection to the tracer. If you are already using ddtrace-run, the integration can be enabled with setting the environm
We have added support for logs injection to the tracer. If you are already using ddtrace-run, the integration can be enabled with setting the environment variable DD_LOGS_INJECTION=true. The default behavior once logs injection is enabled is to have trace information inserted into all log entries. If you prefer more customization, you can manually instrument and configure a log formatter with the tracer information.
With 0.19.0 we have decided to disable the tracing of dbapi2 fetchone()/fetchmany()/fetchall() methods by default.
With 0.19.0 we have decided to disable the tracing of dbapi2 fetchone()/fetchmany()/fetchall() methods by default.
This change effects all integrations which rely on the dbapi2 API, including psycopg2, mysql, mysqldb, pymysql, and sqlite3.
We have introduced this change to reduce the noise added to traces from having these methods (mostly fetchone()) traced by default.
With fetchone() enabled the traces received can get very large for large result sets, the resulting traces either become difficult to read or become too large causing issues when flushing to the trace agent, potentially causing traces to be dropped.
To re-enable the tracing of these methods you can either configure via the environment variable DD_DBAPI2_TRACE_FETCH_METHODS=true or manually via:
from ddtrace import config
config.dbapi2.trace_fetch_methods = True
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Nothing published for this version
This release includes the removal of service sending, this should resolve many of the 400s that are being returned from the Agent resulting in an unfr
This release includes the removal of service sending, this should resolve many of the 400s that are being returned from the Agent resulting in an unfriendly ERROR message and giving the impression that the tracer is failing. (#757)
Nothing published for this version
Nothing published for this version
Add rediscluster integration (#533, #637)
New integrations
Bug fixes
Improvements
HTTPConnection leaking (#542 -- thanks @mackeyja92)[opentracer] Activate span context on extract (#606, #608)
Bug fixes
Improvements
Tracer.set_tags (#612 -- thanks @goodspark)In this release we are happy to introduce the beta for the long-awaited OpenTracing compatible API layer for ddtrace!
OpenTracing
In this release we are happy to introduce the beta for the long-awaited OpenTracing compatible API layer for ddtrace!
Support for opentracing>=2.0.0 is provided in this release. Namely, the following are supported:
start_span/start_active_spaninject and extract functionalitybaggage, through set_baggage_item and get_baggage_itemddtrace-runFor setup information and usage see our docs for the Datadog OpenTracing tracer.
CI Improvements
Also included in this release are some optimizations to our CI which should get things running a bit quicker.
Thanks @labbati!
[core] remove the root logger configuration within the library
Bug fixes
Breaking changes Using the signal based approach increase the stability of our instrumentation, but it limits what is currently traced. This is a list…
New integrations
pymemcache integration (#511)Celery integration
Due to some limitations with our Celery integration, we changed our instrumentation to a signals based approach. We also started using import hooks to instrument Celery, so that enabling the instrumentation doesn't trigger a celery import.
Breaking changes Using the signal based approach increase the stability of our instrumentation, but it limits what is currently traced. This is a list of changes that are considered breaking changes in the behavior and not in the API, so no changes are needed in your code unless you want a different behavior:
apply(), apply_async() and delay() will be traced but tasks invoked with run() will not be traced.patch_task() is deprecated; if it's used, all tasks will be instrumentedBug fixes
DATADOG_TRACE_AGENT_HOSTNAME environment variable if available (#509, #524 -- thanks @hfern!)getresponse (#464, #527)app_type during initialization (#492, #507)None if no region (#525, #526)TraceMiddleware is used (#538)Improvements
[celery] add support for celery v1 tasks (old-style tasks) (#465, #423)
Bugfixes
ddtrace-run broke third-party script support; now it handles correctly the argv params (#469, #423)TaskRegistry to support old-style task with ddtrace-run (#484)DatabaseWrapper loaded in right thread, after removing setting_changed signal from the DatadogSettings (#481, #435)shared_task decorator wrapper to trace properly Celery tasks (#486, #451)sampling_priority field when Distributed Tracing is enabled (#457)quote_ident typing is used (#477, #474, #383)[boto] Botocore and boto instrumentation is enabled by default using patch_all()
New integrations
patch_all() (#319)concurrent module (#429, docs)pymysql support (#296, docs -- thanks @wklken)Improvements
requests module and will be implemented in other integrations in newer releases (#445, #443, #450, #454, #441)celery-producer and celery-worker for better stats (#432)Span (#433)split_by_domain config to split service name by domain (#434)futures instrumentation (#431)Bugfixes
sitecustomize.py is imported when ddtrace-run wrapper is used (#458)ddtrace logger instead of Flask to avoid having a custom log filter (#447, #455)Breaking changes
celery-producer and celery-worker. After the upgrade, you'll stop sending data to what was the default service name (celery). You should check the new services instead because you'll see a drop. Previously reported traces in the celery service, are still available if you move back the time selector.[django] remove MIDDLEWARE_CLASSES deprecation warning from tests
Improvements
route argument in TracePlugin, to support Bottle 0.11.x (#439)Bugfixes
MIDDLEWARE_CLASSES deprecation warning from tests (#444)MIDDLEWARE or MIDDLEWARE_CLASSES are loaded with tracing middlewares (#446)[dbapi] remove sql.query tag from SQL spans, so that the content is properly obfuscated in the Agent. This security fix is required to prevent wrong d…
Security fixes
sql.query tag from SQL spans, so that the content is properly obfuscated in the Agent. This security fix is required to prevent wrong data collection of reported SQL queries. This issue impacts only MySQL integrations and NOT psycopg2 or sqlalchemy while using the PostgreSQL driver. (#421)New integrations
MySQL-python and mysqlclient packages are currently supported (#376 -- thanks @yoichi!)Bugfixes
ddtrace-run script accepts DATADOG_PRIORITY_SAMPLING to enable Priority Sampling (#426)ddtrace-run script can patch a PylonsApp (#416)render function (#420)Distributed Tracing Add distributed tracing using integration settings for the following libraries/frameworks:
Distributed Tracing Add distributed tracing using integration settings for the following libraries/frameworks:
bottle (#382)requests (#372)pyramid (#403)Improvements
concurrent.futures if available, improving the way traces are built when propagation happens between threads (#362 -- thanks @codywilbourn)Bugfixes
register_type (#393 -- thanks @stj)render kwargs (#384 -- thanks @joual)HTTPExceptions as valid response types (#401, #386 -- thanks @TylerLubeck)unpatch and double-patch protection (#404)resource field within request (#353, #410)New feature that propagates the sampling priority across services. This is useful to mark traces as "don’t keep the trace" or "must have" when distrib
Distributed Sampling (beta)
New feature that propagates the sampling priority across services. This is useful to mark traces as "don’t keep the trace" or "must have" when distributed tracing is used. This new functionality requires at least the Datadog Agent 5.19+. Frameworks with out-of-the-box support are: Django, Flask, Tornado (#358, #325, #359, #364, #366, #365, #371, docs)
Improvements
Span context. (#339)HTTPPropagator class to inject and extract the tracing context in HTTP headers (#363, #374 docs)DATADOG_SERVICE_NAME env var, if defined (#347 -- thanks @miketheman)Bugfixes
[django] disable database or cache instrumentation via settings so that each Django component instrumentation can be disabled (#314, docs -- thanks @m
New features
ddtrace.contrib.django.TraceMiddleware for your middleware list after the upgrade. This is not mandatory but suggested (#314, #346)execute_async() operations (#333)Bugfixes
Configurator behavior (#343)Integration coverage
Documentation
patch_all() and patch() (#321 -- thanks @gomlgs)[core] add a processing pipeline to the AsyncWorker, so that traces can be filtered easily. This change doesn't have any performance impact with exist
New features
AsyncWorker, so that traces can be filtered easily. This change doesn't have any performance impact with existing installations, and is expected to work well with async frameworks / libraries (#303, docs)Bugfixes
async with context manager so that it returns the wrapper instead of the wrapped object (#307)Documentation
[core] add process ID in root spans metadata
New features
Improvements
Context when a Greenlet is created so that the tracing context is automatically propagated with the right parenting (#287)patch() method to automatically propagate the tracing context between different asyncio tasks (#260 #297, docs -- thanks @thehesiod)DEFAULT_DATABASE_PREFIX setting to append a prefix to database service (#291, docs -- thanks @jairhenrique)Bugfixes
monkey.py module (#281)ddtrace exception middleware catches exceptions even if a custom middleware returns a Response object (#278)View is a partial function (#292)New integrations
httplib and http.lib(#137 -- thanks @brettlangdon)aiobotocore support (#257, #298, docs -- thanks @thehesiod)aiopg support (#258, docs -- thanks @thehesiod)[flask] add the http method to flask spans
Bugfixes
db (#276)span.set_traceback()now sets the traceback even if there's no exception (#277)Read the full changeset.
[flask] avoid using weak references when Flask is instrumented via Blinker. This resolves initialization issues when the traced_app = TraceMiddleware(
Bugfixes
traced_app = TraceMiddleware(app, ...) reference goes out of the scope or is garbage collected (#273)[sqlalchemy] provide a patch() method that uses the PIN object; this is not a breaking change, but the preferred way to instrument SQLAlchemy is throu…
Improvements
X-Datadog-Trace-Count) so that the receiving agent has more information when dealing with sampling (#254)Bugfixes
PatchException that is handled in the patch_all() when the patch failed. This distinguishes: errors during patch, when an integration is not available and simply when the module is not installed (#262)MySQL-Python instrumentation so that only mysql-connector package is patched; this provides better feedback about what library is supported (#263, #266)patch() method that uses the PIN object; this is not a breaking change, but the preferred way to instrument SQLAlchemy is through patch_all(sqlalchemy=True) or patch(sqlalchemy=True) (#261)BaseException since a SystemExit might've been raised; 500 errors are handled if a timeout occurs (#267, #270)BaseException since a SystemExit might've been raised; 500 errors are handled if a timeout occurs (#269)Read the full changeset
[django] handle tuple INSTALLED_APPS for Django < 1.9
[core] fixed msgpack-python kwarg usage for versions earlier than 0.4.x
Bugfixes
msgpack-python kwarg usage for versions earlier than 0.4.x (#245)Read the full changeset.
Add support for Tornado web 4.0+. Currently this integration is ignored by autopatching, but can be enabled via patch_all(tornado=True) (#204, [docs][
New integrations
4.0+. Currently this integration is ignored by autopatching, but can be enabled via patch_all(tornado=True) (#204, docs -- thanks @ross for reviewing and testing the implementation)Bugfixes
getouterframes(). This is a major improvement that reduces the impact of our tracing calls for Boto2 (#243 -- thanks @wackywendell)func_name work with any callable and not only with functions (#195, #203 -- thanks @m0n5t3r)Breaking change
elasticsearch before executing patch_all(), no traces are created. This patch changed where the PIN object is attached, so you should update your instrumentation as described below (#238)Migrate from 0.7.x to 0.8.0
elasticsearch module while now it uses elasticsearch.Transport. If you were using the Pin to override some tracing settings, you must update your code from:Pin.override(client, service='elasticsearch-traces')
to:
Pin.override(client.transport, service='elasticsearch-traces')
Internals update
wrap() tracer decorator can be extended by Python integrations when the usual approach is not suitable for the given execution context (#221)Read the full changeset.
Add support for boto (>=2.29.0) and botocore (>= 1.4.51) #209 . Currently these integrations are ignored by autopatching, but can be enabled via patch
New integrations
boto (>=2.29.0) and botocore (>= 1.4.51) #209 . Currently these integrations are ignored by autopatching, but can be enabled via patch_all(boto=True, botocore=True)New features
ddtrace-run command-line entrypoint to provide tracing without explicit additions to code. More information here http://pypi.datadoghq.com/trace/docs/#get-started #169Bugfixes
datadog_django app label to avoid clashes with existing app configs #235Add support for asynchronous Python. This is a major improvement that adds support for asyncio, aiohttp and gevent (#161, docs: [asyncio][1] - [aiohtt
New integrations
asyncio, aiohttp and gevent (#161, docs: asyncio - aiohttp - gevent)New features
debug_logging is activated; useful in synchronous environments to detect unfinished/unreported traces (#210)Bugfixes
mysql integration is patched when using patch() or patch_all() (#178)DATADOG_TRACE setting (#159)tracer reference when set_service_info is invoked (#199)Breaking changes
7777 has been replaced with the new 8126 available from Datadog Agent 5.11.0 and above (#212)ThreadLocalSpanBuffer. It has been fully replaced by the Context propagation (#211)Migrate from 0.5.x to 0.6.0
ThreadLocalSpanBuffer manually, you need to use the Context class in your logic so that it is compliant with the Context propagation. Check the Advanced usage section.Advanced usage This is a list of new features that may be used for manual instrumentation when you're using a library or a framework that is not currently supported:
Context propagation instead of a global buffer. This plays well with asynchronous programming where a context switching may happen while handling different logical execution flows (#172)tracer.trace() handles automatically the Context propagation and remains the preferable APItracer.get_call_context() to retrieve the current Context instance that is holding the entire trace for this logical execution (docs)start_span as a way to manually create spans, while handling the Context propagation (docs)Read the full changeset.
ElasticSearch integration takes care of the returning status code in case of a TransportError
Improvements
TransportError (#175)Bugfixes
Span.error attribute if the response is a server error (#176)Read the full changeset.
Nothing published for this version
[ElasticSearch] use ElasticSearch serializer so that the serialization works with dates, decimals and UUIDs #131
Bugfixes
AGENT_PORT because Django recast strings as unicode strings, which invalidate the input for getaddrinfo() in Python 2.7 #140Compatibility
django.contrib.auth is installed through the django.apps module. This improves the best-effort support for Django < 1.7 #136Read the full changeset
One column per quarter.