Skip to content

Releases: DataDog/dd-trace-py

0.9.1

01 Aug 11:29
Compare
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.

0.9.0

05 Jul 12:20
Compare
Choose a tag to compare

New features

  • [core] add process ID in root spans metadata (#293)

Improvements

  • [falcon] extended support for Falcon 1.2; improved error handling (#295)
  • [gevent] create a new Context when a Greenlet is created so that the tracing context is automatically propagated with the right parenting (#287)
  • [asyncio] providing helpers and patch() method to automatically propagate the tracing context between different asyncio tasks (#260 #297, docs -- thanks @thehesiod)
  • [aiohttp] add experimental feature to continue a trace from request headers (#259, docs -- thanks @thehesiod)
  • [django] add DEFAULT_DATABASE_PREFIX setting to append a prefix to database service (#291, docs -- thanks @jairhenrique)

Bugfixes

  • [logging] use specific logger instead of the root one in monkey.py module (#281)
  • [django] ddtrace exception middleware catches exceptions even if a custom middleware returns a Response object (#278)
  • [pylons] handle correctly the http status code when it's wrongly formatted (#284)
  • [django] request resource handles the case where the View is a partial function (#292)
  • [flask] attach stack trace to Flask errors (#302)

New integrations

Read the full changeset.

0.8.5

30 May 16:17
Compare
Choose a tag to compare

Bugfixes

  • [flask] add the http method to flask spans (#274)
  • [sqlite3] changed the app_type to db (#276)
  • [core] span.set_traceback()now sets the traceback even if there's no exception (#277)

Read the full changeset.

0.8.4

19 May 09:27
Compare
Choose a tag to compare

Bugfixes

  • [flask] avoid using weak references when Flask is instrumented via Blinker. This resolves initialization issues when the traced_app = TraceMiddleware(app, ...) reference goes out of the scope or is garbage collected (#273)

0.8.3

15 May 11:17
Compare
Choose a tag to compare

Improvements

  • [transport] add presampler header (X-Datadog-Trace-Count) so that the receiving agent has more information when dealing with sampling (#254)
  • [docs] updated our documentation (#264, #271)

Bugfixes

  • [core] patch loader raises 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] distinguish MySQL-Python instrumentation so that only mysql-connector package is patched; this provides better feedback about what library is supported (#263, #266)
  • [sqlalchemy] provide a 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)
  • [pylons] catch BaseException since a SystemExit might've been raised; 500 errors are handled if a timeout occurs (#267, #270)
  • [pyramid] catch BaseException since a SystemExit might've been raised; 500 errors are handled if a timeout occurs (#269)

Read the full changeset

0.8.2

28 Apr 15:43
Compare
Choose a tag to compare

Bugfixes

  • [django] handle tuple INSTALLED_APPS for Django < 1.9 (#253)

Read the full changeset

0.8.1

30 May 16:16
Compare
Choose a tag to compare

Bugfixes

  • [core] fixed msgpack-python kwarg usage for versions earlier than 0.4.x (#245)
  • [pyramid] add request method to Pyramid trace span resource name (#249, thanks @johnpkennedy)

Read the full changeset.

0.8.0

10 Apr 17:19
Compare
Choose a tag to compare

New integrations

  • 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 -- thanks @ross for reviewing and testing the implementation)

Bugfixes

  • [docs] Minor updates to our documentation (#239, #237, #242, #244 -- thanks @liubin @pahaz)
  • [boto] Boto2 and Botocore integrations have safety check to prevent double patching (#240)
  • [boto] Use frames directly without calling getouterframes(). This is a major improvement that reduces the impact of our tracing calls for Boto2 (#243 -- thanks @wackywendell)
  • [django] make func_name work with any callable and not only with functions (#195, #203 -- thanks @m0n5t3r)

Breaking change

  • [elasticsearch] when importing 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] the PIN object was previously attached to the 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

  • the Python traces logs and returns error when there is a communication issue with the APM Agent (#173)
  • the 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.

0.7.0

29 Mar 18:08
Compare
Choose a tag to compare

New integrations

  • 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_all(boto=True, botocore=True)

New features

Bugfixes

  • [dbapi] Ensure cursors play well with context managers #231
  • [django] Provide a unique datadog_django app label to avoid clashes with existing app configs #235
  • [pyramid] Ensure pyramid spans have method and route metadata consistent with other web frameworks #220 (thanks @johnpkennedy)

0.6.0

09 Mar 13:47
Compare
Choose a tag to compare

New integrations

  • Add support for asynchronous Python. This is a major improvement that adds support for asyncio, aiohttp and gevent (#161, docs: asyncio - aiohttp - gevent)
  • Add Celery integration (#135, #196, docs)

New features

  • Add explicit support for Python 3.5, and 3.6 (#215, see supported versions)
  • print the list of unfinished spans if the debug_logging is activated; useful in synchronous environments to detect unfinished/unreported traces (#210)

Bugfixes

  • [mysql] mysql integration is patched when using patch() or patch_all() (#178)
  • [django] set global tracer tags from Django DATADOG_TRACE setting (#159)
  • [bottle] wrong tracer reference when set_service_info is invoked (#199)

Breaking changes

  • Default port 7777 has been replaced with the new 8126 available from Datadog Agent 5.11.0 and above (#212)
  • Removed the ThreadLocalSpanBuffer. It has been fully replaced by the Context propagation (#211)

Migrate from 0.5.x to 0.6.0

  • Datadog Agent 5.11.0 or above is required.
  • If you're using the 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:

  • Use 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 API
  • Add tracer.get_call_context() to retrieve the current Context instance that is holding the entire trace for this logical execution (docs)
  • Add start_span as a way to manually create spans, while handling the Context propagation (docs)

Read the full changeset.