Releases: DataDog/dd-trace-py
Releases · DataDog/dd-trace-py
0.52.0
Release Notes
0.52.0
New Features
- The
ddtrace.Tracer.get_log_correlation_contextmethod has been added to replaceddtrace.helpers.get_correlation_ids. It now returns a dictionary which includes the current span's trace and span ids, as well as the configured service, version, and environment names. - Add tracing support for the
httpxlibrary. Supported versions>=0.14.0. - ASGI: store the ASGI span in the scope. The span can be retrieved with the
ddtrace.contrib.asgi.span_from_scopefunction. - Submit runtime metrics as distribution metrics instead of gauge metrics.
- Support flask-caching (>= 1.10.0) with the Flask-Cache tracer.
- Only for CI Visibility (
pytestintegration): It is now possible to specify any of the following git metadata through environment variables:DD_GIT_REPOSITORY_URL: The url of the repository where the code is storedDD_GIT_TAG: The tag of the commit, if it has oneDD_GIT_BRANCH: The branch where this commit belongs toDD_GIT_COMMIT_SHA: The commit hash of the current codeDD_GIT_COMMIT_MESSAGE: Commit messageDD_GIT_COMMIT_AUTHOR_NAME: Commit author nameDD_GIT_COMMIT_AUTHOR_EMAIL: Commit author emailDD_GIT_COMMIT_AUTHOR_DATE: The commit author date (ISO 8601)DD_GIT_COMMIT_COMMITTER_NAME: Commit committer nameDD_GIT_COMMIT_COMMITTER_EMAIL: Commit committer emailDD_GIT_COMMIT_COMMITTER_DATE: The commit committer date (ISO 8601)
Bug Fixes
- ASGI: handle decoding errors when extracting headers for trace propagation.
- Corrected some typing annotations for PEP 484 compliance
- Django: add support for version 3.1+ ASGI applications. A different codepath is taken for requests starting in Django 3.1 which led to the top level span not being generated for requests. The fix introduces automatic installation of the ASGI middleware to trace Django requests.
- dogpile.cache: handle both kwargs and args in the wrapper functions (using only kwargs would result in an IndexError).
- Fixes an issue with the Django integration where if the
urlconfchanges at any point during the handling of the request then the resource name will only be<METHOD> 404. This fix moves resource name resolution to the end of the request. - Fixes error with tagging non-string Flask view args.
werkzeug.exceptions.NotFound404 errors are no longer raised and logged as a server error in the Flask integration.- Fixes type hinting for
**patch_modulesparameter forpatch/patch_allfunctions. - Fixes an issue when using the pytest plugin with doctest which raises an
AttributeErroronDoctestItem. - Fixes a bug in the pytest plugin where xfail test cases in a test file with a module-wide skip raises attribute errors and are marked as xfail rather than skipped.
- Fixed the handling of sanic endpoint paths with non-string arguments.
- opentracer: don't override default tracing config for the
ENABLED,AGENT_HOSTNAME,AGENT_HTTPSorAGENT_PORTsettings.
0.52.0rc3
Third pre-release of 0.52 which contains:
Replacement API for get_correlation_ids
0.52.0rc1
0.52 prerelease featuring a new httpx integration, support for latest cassandra as well as fixes for django and flask.
0.51.2
Release Notes
0.51.2
Bug Fixes
- ASGI: handle decoding errors when extracting headers for trace propagation.
- Corrected some typing annotations for PEP 484 compliance
- Django: add support for version 3.1+ ASGI applications. A different codepath is taken for requests starting in Django 3.1 which led to the top level span not being generated for requests. The fix introduces automatic installation of the ASGI middleware to trace Django requests.
- Fixes error with tagging non-string Flask view args.
- Fixes type hinting for
**patch_modulesparameter forpatch/patch_allfunctions. - Fixes a bug in the pytest plugin where xfail test cases in a test file with a module-wide skip raises attribute errors and are marked as xfail rather than skipped.
0.50.4
0.51.1
Release Notes
0.51.1
- Include the
py.typedfile to enable mypy type checking withddtrace.
0.51.0
Release Notes
v0.51.0
Upgrade Notes
- The legacy Django configuration method (deprecated in 0.34) has been removed.
- botocore: Update trace propagation format for directly invoked Lambda functions. This breaks compatibility with Lambda functions instrumented with datadog-lambda-python < v41 or datadog-lambda-js < v3.57.0. Please upgrade datadog-lambda-* in invoked lambda functions, or engage legacy compatibility mode in one of two ways:
- ddtrace.config.botocore.invoke_with_legacy_context = True
- DD_BOTOCORE_INVOKE_WITH_LEGACY_CONTEXT=true
Bug Fixes
- opentracer: don't override default tracing config for the ENABLED,
AGENT_HOSTNAME, AGENT_HTTPS or AGENT_PORT settings. - Fixed JSON encoding errors in the pytest plugin for parameterized tests with dictionary parameters with tuple keys. The pytest plugin now always JSON encodes the string representations of test parameters.
- Fix a possible NoneType error in the WSGI middleware start_response method.
- Fixes an issue with enabling the runtime worker introduced in v0.49.0 where no runtime metrics were sent to the agent.
- Fix pymongo 3.12.0+ spans not being generated.
New Features
- Added support for
aiopg~=0.16.0. - Add MariaDB integration.
- The profiler now exports active tasks for CPU and wall time profiles.
- Added support for
jinja2~=3.0.0. - The pytest integration now uses the name of the repository being tested as the default test service name.
Deprecation Notes
- Removed the
collect_metricsargument fromTracer.configure. See the release notes for v0.49.0 for the migration instructions. monkey.patch_moduleis deprecated.monkey.get_patch_moduleis deprecated.
0.51.0rc4
- opentracer: don't override default tracing config for the
ENABLED,
AGENT_HOSTNAME,AGENT_HTTPSorAGENT_PORTsettings.
0.51.0rc3
Third release candidate for 0.51 including the removal of the collect_metrics argument from tracer.configure().
0.50.3
Release Notes
0.50.3
Bug Fixes
- Fixed the handling of sanic endpoint paths with non-string arguments.