Skip to content

Releases: DataDog/dd-trace-py

0.13.1

04 Sep 15:48

Choose a tag to compare

Bug fixes

  • [core] remove the root logger configuration within the library (#556)

Read the full changeset and the release milestone.

0.13.0

23 Aug 12:53

Choose a tag to compare

New integrations

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:

  • By default all tasks will be traced if they use the Celery signals API, so tasks invoked with methods like 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 instrumented

Bug fixes

  • [core] check if bootstrap dir is in path before removal (#516 -- thanks @beezz!)
  • [core] have hostname default to DATADOG_TRACE_AGENT_HOSTNAME environment variable if available (#509, #524 -- thanks @hfern!)
  • [core] add WSGI-style http headers support to HTTP propagator (#456, #522)
  • [core] Enable buffering on getresponse (#464, #527)
  • [core] configure the root logger (#536)
  • [aiopg] set the app_type during initialization (#492, #507)
  • [boto] default to None if no region (#525, #526)
  • [flask] avoid double instrumentation when TraceMiddleware is used (#538)
  • [pymongo] fix multiple host kwargs (#535)
  • [tornado] make settings object accessible during configuration (#499, #498 -- thanks @kave!)

Improvements

  • [core/helpers] add a shortcut to retrieve Trace correlation identifiers (#488)

Read the full changeset and the release milestone.

0.12.1

14 Jun 09:08

Choose a tag to compare

Bugfixes

  • [celery] add support for celery v1 tasks (old-style tasks) (#465, #423)
  • [celery] ddtrace-run broke third-party script support; now it handles correctly the argv params (#469, #423)
  • [celery] patch TaskRegistry to support old-style task with ddtrace-run (#484)
  • [django] update error handling if another middleware has handled the exception already (#418, #462)
  • [django] DatabaseWrapper loaded in right thread, after removing setting_changed signal from the DatadogSettings (#481, #435)
  • [django/celery] add shared_task decorator wrapper to trace properly Celery tasks (#486, #451)
  • [django/docs] notes about Debug Mode, and debugging (#476 -- thanks @ndkv!)
  • [gevent] pass sampling_priority field when Distributed Tracing is enabled (#457)
  • [mysqlb] add missing services info when they're flushed (#468, #428)
  • [psycopg2] properly patch the driver when quote_ident typing is used (#477, #474, #383)
  • [pylons] ensure the middleware code is Python 3 compatible to avoid crashes on import (#475, #472)
  • [requests] add missing services info when they're flushed (#471, #428)

Read the full changeset and the release milestone.

0.12.0

03 May 12:04

Choose a tag to compare

New integrations

  • [boto] Botocore and boto instrumentation is enabled by default using patch_all() (#319)
  • [futures] provide context propagation for concurrent module (#429, docs)
  • [mysql] add pymysql support (#296, docs -- thanks @wklken)

Improvements

  • [core] introducing a low-level API to define configurations for each integration. This API is used only by the requests module and will be implemented in other integrations in newer releases (#445, #443, #450, #454, #441)
  • [celery] split the service name in celery-producer and celery-worker for better stats (#432)
  • [falcon] add distributed tracing (#437)
  • [requests] provide a default service name for the request Span (#433)
  • [requests] add split_by_domain config to split service name by domain (#434)
  • [tornado] better compatibility using futures instrumentation (#431)

Bugfixes

  • [core] ensure sitecustomize.py is imported when ddtrace-run wrapper is used (#458)
  • [flask] use ddtrace logger instead of Flask to avoid having a custom log filter (#447, #455)

Breaking changes

  • [celery] the name of the service is now split in two different services: 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.

Read the full changeset and the release milestone.

0.11.1

30 Mar 09:47

Choose a tag to compare

Improvements

  • [bottle] use the route argument in TracePlugin, to support Bottle 0.11.x (#439)

Bugfixes

  • [django] gunicorn gevent worker wasn't instrumenting database connections (#442)
  • [django] remove MIDDLEWARE_CLASSES deprecation warning from tests (#444)
  • [django] ensure only MIDDLEWARE or MIDDLEWARE_CLASSES are loaded with tracing middlewares (#446)

Read the full changeset and the release milestone.

0.11.0

05 Mar 10:50

Choose a tag to compare

Security fixes

  • [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 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

  • [django] add support for Django 2.0 (#415 -- thanks @sciyoshi!)
  • [mysql] MySQL-python and mysqlclient packages are currently supported (#376 -- thanks @yoichi!)
  • [psycopg2] add support for version 2.4 (#424)
  • [pylons] Pylons >= 0.9.6 is officially supported (#416)

Bugfixes

  • [core] ddtrace-run script accepts DATADOG_PRIORITY_SAMPLING to enable Priority Sampling (#426)
  • [pylons] add distributed tracing via kwarg and environment variable (#425, docs)
  • [pylons] ddtrace-run script can patch a PylonsApp (#416)
  • [pylons] add tracing to Pylons render function (#420)

Read the full changeset and 0.11.0 milestone.

0.10.1

05 Feb 14:17
e1bb09f

Choose a tag to compare

Distributed Tracing
Add distributed tracing using integration settings for the following libraries/frameworks:

Improvements

  • [core] provide constants to pick Priority Sampling values (#391)
  • [django] add support for Django Rest Framework (#389)
  • [tooling] add missing classifiers for pypi (#395 -- thanks @PCManticore)
  • [tornado] patch concurrent.futures if available, improving the way traces are built when propagation happens between threads (#362 -- thanks @codywilbourn)

Bugfixes

  • [httplib] don't overwrite return value (#380 -- thanks @yoichi)
  • [psycopg2] patch all imports of register_type (#393 -- thanks @stj)
  • [pyramid] keep request as part of render kwargs (#384 -- thanks @joual)
  • [pyramid] use pyramid HTTPExceptions as valid response types (#401, #386 -- thanks @TylerLubeck)
  • [requests] add unpatch and double-patch protection (#404)
  • [flask] don't override code of already handled errors (#390, #409)
  • [flask] allow mutability of resource field within request (#353, #410)

Read the full changeset.

0.10.0

08 Nov 17:59
db47635

Choose a tag to compare

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

  • [core] update the Context propagation API, that includes a new way to retrieve and set the current active Span context. (#339)
  • [core] implement Propagators API to simplify Distributed Tracing. You can use HTTPPropagator class to inject and extract the tracing context in HTTP headers (#363, #374 docs)
  • [celery] use service name from DATADOG_SERVICE_NAME env var, if defined (#347 -- thanks @miketheman)
  • [django] respect env Agent host and port if defined (#354 -- thanks @spesnova)

Bugfixes

  • [pylons] handle exception with non standard 'code' attribute (#350)
  • [pyramid] the application was not traced when the tween list was explicitly specified (#349)

Read the full changeset

0.9.2

12 Sep 13:24

Choose a tag to compare

New features

  • [django] disable database or cache instrumentation via settings so that each Django component instrumentation can be disabled (#314, docs -- thanks @mcanaves)
  • [django] it's not required anymore to add the Django middleware because the Django app ensures that it is installed. You can safely remove ddtrace.contrib.django.TraceMiddleware for your middleware list after the upgrade. This is not mandatory but suggested (#314, #346)
  • [cassandra] trace execute_async() operations (#333)

Bugfixes

  • [mysql] prevent the Pin from attaching empty tags (#327)
  • [django] fixed the initialization order to prevent logs when the tracer is disabled (#334)
  • [sqlite3] add tests to ensure that services are properly sent (#337)
  • [pyramid] fixed Pyramid crash when 'include()' is used with relative import paths (#342)
  • [pylons] re-raise the exception with the original traceback in case of errors. Before Pylons exceptions were correctly handled but hidden by the tracing middleware. (#317)
  • [pyramid] disable autocommit in Pyramid patching, to avoid altering the Configurator behavior (#343)
  • [flask] fix Flask instrumentation that didn't close Jinja spans if an error was thrown (#344)

Integration coverage

  • officially support ElasticSearch 1.6+ (#341)

Documentation

  • fixed usage examples for patch_all() and patch() (#321 -- thanks @gomlgs)
  • added a section about updating the hostname and port (#335)

Read the full changeset.

0.9.1

01 Aug 11:29

Choose a tag to compare

New features

  • [core] add a processing pipeline to the 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)
  • [core] add language and library version metadata to keep track of them in the Datadog Agent. All values are sent via headers (#289)

Bugfixes

  • [aiobotocore] update async with context manager so that it returns the wrapper instead of the wrapped object (#307)
  • [boto, botocore] change the service metadata app for AWS with a more meaningful name (#315)

Documentation

  • improving documentation so that it's more explicit how a framework should be auto-instrumented (#305, #308)
  • add the list of auto-instrumented modules (#306)

Read the full changeset.