Skip to content

Releases: DataDog/dd-trace-py

0.38.1

28 May 20:06
bcebd33

Choose a tag to compare

0.38.1

This patch release includes 2 fixes:

  • Fix span/trace id generation collisions when forking by reverting the changes we made to speed up id generation. (#1470)

  • Force rebuilding of Cython files in setup.py. This will ensure that we build for the right Python
    version. (#1468)

0.38.0

21 May 21:40
5dfce22

Choose a tag to compare

Upgrading to 0.38.0

Integrations

Celery

  • Support for distributed tracing was added in #1194. It is default disabled but is easily enabled via DD_CELERY_DISTRIBUTED_TRACING=true or via the config API ddtrace.config.celery['distributed_tracing'] = True. Thanks @thieman!
  • Analyzed span configuration was added to easily configure Celery spans to be analyzed. This can be done via the environment variable DD_CELERY_ANALYTICS_ENABLED=true or with the config API ddtrace.config.celery['analytics_enabled'] = True.

Django

  • A config option was added to allow enabling/disabling instrumenting middleware. It can be set with the environment variable DD_DJANGO_INSTRUMENT_MIDDLEWARE=true|false or via the config API ddtrace.config.django['instrument_middleware'] = False # default is True.

Core

  • Runtime ID tag support for traces and profiles. This will allow us to correlate traces and profiles generated by applications.

OpenTracing

  • Support for active_span() was added to our OpenTracing tracer.

Profiling

  • Storing of span id in profiling events which will enable linking between a trace and a profile in the product.

Tracer

  • DD_TAGS environment variable added to replace DD_TRACE_GLOBAL_TAGS.

Changes

New features

  • opentracer: implement active_span (#1395)
  • django: add config for instrumenting middleware (#1384)
  • celery: Add analyzed span configuration option (#1383)
  • Add runtime id tag support for traces & profiles (#1379)
  • profiling: retry on upload error (#1376)
  • tracer: Add DD_TAGS environment variable support (#1315)
  • celery: Add distributed tracing (#1194 -- thanks @thieman)
  • profiling: Store span ids in profiling events (#1043)

Improvements

  • monkey: add better error messages (#1430)
  • Make hooks settings generic (#1428)
  • internal: Change trace too large message to debug (#1403 -- thanks @ZStriker19)
  • internal: Ensure queue is at or over max size before dropping (#1399)
  • performance: improve span id generation (#1378)

Bug fixes

  • hooks: use log.error to log hook exceptions (#1436)
  • writer: raise RuntimeError("threads can only be started once") (#1425 -- thanks @YasuoSasaki)
  • settings: pass the memodict argument to subcall to deepcopy (#1401)
  • profiling: correct the scheduler sleep time based on exporter time (#1386)
  • integration config: copy and deepcopy implementations (#1381)
  • utils: do not expose deepmerge function (#1375)

Documentation

  • Updated to pypi advance usage docs (#1402)

Testing

0.37.1

15 May 16:38
cc7a11c

Choose a tag to compare

0.37.1

This patch release includes fixes for install problems with Alpine Linux as well as for a bug with tag encoding in the profiler.

Fixes

  • fix(profiling/http): make sure tags are UTF-8 encoded (#1393)
  • fix(profiling): allow to build on Alpine Linux (#1391)
  • fix: don't allow package version to be None (#1380)

0.37.0

27 Apr 21:05
e60b9a0

Choose a tag to compare

Upgrading to 0.37.0

This release introduces mainly bug fixes as well as some new configuration options for the profiling library.

Profiler

New environment variables have been added to allow you to easily configure and describe your application in Datadog.

  • DD_SITE: Specify which site to use for uploading profiles. Set to datadoghq.eu to use EU site.
  • DD_API_KEY: an alias to DD_PROFILING_API_KEY.
  • DD_ENV: the environment in which your application is running. eg: prod, staging
  • DD_VERSION: the version of your application. eg: 1.2.3, 6c44da2, 2020.02.13
  • DD_SERVICE: the service which your application represents.

Changes

Bug fixes

  • tracer: stop previous writer if a new one is created (#1356)
  • Fix task context management for asyncio in Python <3.7 (#1353)
  • fix(profiling): pthread_t is defined as unsigned long, not int (#1347)
  • span: handle non-string tag keys (#1345)
  • fix(profiling): use formats.asbool to convert bool from env (#1342)
  • fix: avoid context deadlock with logs injection enabled (#1338 -- thanks @zhammer)
  • fix: make C extensions mandatory (#1333)
  • fix(profiling): allow to override options after load (#1332)
  • fix(profiling): ignore failure on shutdown (#1327)
  • logging: fix docs typo (#1323)

Integrations

  • Add config to omit django.user.name tag from request root span (#1361 -- thanks @sebcoetzee)
  • Update error event handler name within SQLAlchemy engine (#1324 -- thanks @RobertTownley)
  • docs(opentracing): add celery example (#1329)

Core

  • refactor(tracer): remove property for Tracer.context_provider (#1371)
  • writer: allow configuration of queue maxsize via env var (#1364)
  • feat(profiling): replace http_client by urllib for uploading (#1359)
  • feat(profiling): allow to pass service_name to HTTP exporter (#1358)
  • Updates configuration docs (#1360 -- thanks @sburns)
  • feat(profiling): add the pip install when recompilation is needed (#1334)
  • tracer: support tracing across fork() (#1331)
  • Allow Profiler to finish upload data in the background when stopped (#1322)

Tests

  • test(profiling): check for thread presence rather than number of threads (#1357)
  • aiobotocore: pin to <1.0 (#1330)
  • ci: allow to use latest pytest version (#1326)
  • fix(tests/profiling): use a string with setenv, not an int (#1321)

0.36.1

08 Apr 15:16

Choose a tag to compare

Changes

This patch release addresses an issue when debug logging is enabled:

  • fix: avoid context deadlock with logs injection enabled (#1338 -- thanks @zhammer)

Changeset

Read the full changeset.

0.36.0

01 Apr 20:50
8ece999

Choose a tag to compare

Upgrading to 0.36.0

This release includes support for setting global application tags which will help Datadog better correlate your Python application traces and logs with other services in your infrastructure.

By providing the following settings, ddtrace will tag your application's traces and logs appropriately:

  • DD_ENV environment variable or ddtrace.config.env: the environment in which your application is running. eg: prod, staging.
  • DD_VERSION environment variable or ddtrace.config.version: the version of your application. eg: 1.2.3, 6c44da20, 2020.02.13
  • DD_SERVICE environment variable or ddtrace.config.service: the service which your application represents.

In you are using our logging integration manually, please update your formatter to also include the dd.env, dd.service and dd.version attributes as well. See our docs on Logs Injection for more details.

Profiling

If you are using the profiler, please note that ddtrace.profile has been renamed to ddtrace.profiling.

Changes

Core

  • core: Add support for DD_ENV (#1240)
  • core: Add support for DD_VERSION (#1222)
  • core: Add support for DD_SERVICE (#1280, #1292, #1294, #1296, #1297)
  • inject dd.service, dd.env, and dd.version into logs (#1270)
  • Log exporter support (#1276)
  • chore: update wrapt to 1.12.1 (#1283)
  • Update _dd.measured tag support (#1302)
  • feat(tracer): deprecate global excepthook (#1307)

Integrations

  • guard against missing botocore response metadata (#1264 -- thanks @zhammer)
  • integrations: prioritize DD_SERVICE (#1298)

Profiler

  • refactor: rename ddtrace.profile to ddtrace.profiling (#1289)
  • fix(profiling): fix Lock issue when stored in a class attribute (#1301)
  • feat(profiling): expose the Profiler object directly in ddtrace.profiling (#1303)
  • fix(tests/profiling): use a string with setenv, not a int (#1321)
  • fix(profiling/http): converts nanoseconds timestamp to seconds (#1325)

Opentracing

Documentation

  • fix import for profiling docs (#1271)
  • fix profiler example and more details about API usage (#1284)
  • Fixed typos in ddtrace.contrib.django docs (#1286 -- thanks @sergeykolosov)
  • Fix tiny typo in Issue template (#1288)
  • Typo in readme (#1300 -- thanks @Holek)

Testing and tooling

  • Check profiler accuracy (#1260)
  • chore(ci): fix flake8 and pin pytest and readme_renderer (#1278)
  • fix(tests,profile): do not test the number of locking events (#1282)
  • fix: do not build wheels on Python 3.4 + run test buildin wheels in the CI (#1287)
  • fix(tests,profiling): correct number of frames handling (#1290)
  • fix(tests, opentracer): flaky threading test (#1293)
  • build: use latest manylinux images (#1305)
  • feat(wheels): update to manylinux2010 (#1308)

0.35.0

13 Mar 20:48
ebcae8e

Choose a tag to compare

Upgrading to 0.35.0

This release adds:

  • A Python profiler
  • New hook registry for patching on import
  • botocore support for RequestId
  • Support aiobotocore>=0.11.0
  • Support rediscluster==2.0.0
  • Documentation for uWSGI
  • Python 3.8 support

Changes

Core

  • internal: Add import patching and import hook registry (#981)
  • core: Add logs injection setting to Config (#1258)

Integrations

  • fix(aiobotocore): add support for aiobotocore>=0.11.0 (#1268)
  • botocore - support tag for AWS RequestId (#1248 -- thanks @someboredkiddo)
  • rediscluster: Add support for v2.0.0 (#1225)
  • Use DATADOG_SERVICE_NAME as default tornado name (#1257 -- thanks @zhammer)

Profiler

  • Import profiling library (#1203)

Documentation

Testing and tooling

  • ci: use medium resource class (#1266)
  • fix(ci): use machine executor for deploy jobs (#1261, #1265)
  • ci: improve tooling for building and pushing wheels (#1256, #1254, #1253, #1252)
  • fix: local docs (#1250)
  • chore(ci): use system Python version for flake8 and black target #1245)
  • ci(tox): leverage tox factor to simplify setenv directives (#1244)
  • fix(ci): remove virtualenv<20 limitation (#1242)
  • refactor: use tox flavor to specify Celery usedevelop setting (#1238)
  • ci: make sure we install cython for deploy_dev (#1232)
  • ci: requires virtualenv < 20 (#1228)
  • fix(tests): do not use numeric value for errno (#1226)
  • fix(docs): s3 deploy requires rebuild of docs (#1223)
  • fix(tests): use encoder decode in tests (#1221)
  • fix(encoding): always return bytes when decoding (#1220)
  • fix(tox): do not skip install for docs (#1218)
  • add Python 3.8 support (#1098)

Changeset

Read the full changeset.

0.34.1

09 Mar 21:14

Choose a tag to compare

Changes

This patch release addresses issues with the new Django integration introduced in 0.34.0:

  • fix(django): handle disallowed hosts (#1235)
  • fix(django): patch staticmethods in views (#1246)
  • docs(django): enabling automatically and manually (#1249)

Changeset

Read the full changeset.

0.34.0

21 Feb 21:02
f8ff030

Choose a tag to compare

Upgrading to 0.34.0

This release adds a new integration for Django. The goal of this effort was to make the Django integration more consistent with our other integrations, simplifying configuration and patching. See the Django documentation for details on how to get started with the integration. For existing Django applications, be sure to consult the migration section of the documentation.

While we are now vendoring psutil, msgpack will no longer be vendored and instead specified as a requirement.

Finally, improvements have been made to the testing and continuous integration.

Changes

Core

  • Unvendor msgpack (#1199, #1216, #1202)
  • Vendor psutil (#1160)
  • Update get_env to support any number of parts (#1208)
  • Set _dd.measured tag on integration spans (#1196)
  • Start writer thread as late as possible (#1193)
  • Refactor setup.py c-extension building (#1191)

Integrations

Testing and tooling

Changeset

Read the full changeset.

0.33.0

23 Jan 17:22

Choose a tag to compare

Upgrading to 0.33.0

This release introduces setting numeric tags as metrics, addresses a regression in Python 3 performance, and introduces a dual license.

Changes

Core

  • Prefer random.getrandbits on Python 3+, fall back to urandom implementation on 2 (#1183 -- thanks @thieman)
  • Set numeric tags on Span.metrics instead of Span.meta (#1169, #1182)
  • Update default sampler to new DatadogSampler (#1172, #1166)
  • Safely deprecate ext type constants (#1165)

Tooling

  • Fix botocore tests (#1177)

Documentation