Releases: DataDog/dd-trace-py
Releases · DataDog/dd-trace-py
1.8.0rc1
Release Notes
Upgrade Notes
- ASM: libddwaf upgraded to version 1.6.1 using a new library loading mechanism
- profiling: upgrades the profiler to support the
v2.4backend API for profile uploads, using a new request format.
Deprecation Notes
DD_REMOTECONFIG_POLL_SECONDSenvironment variable is deprecated and will be removed in v2.0. Please useDD_REMOTE_CONFIG_POLL_INTERVAL_SECONDSinstead.
New Features
- CI Visibility: Add support for CI provider buddy.works
- The component tag has been added for all auto-instrumented spans. The value of the component tag is equal to the name of the integration that produced the span.
- tracing: Adds support for IPv6 agent hostnames for DD_AGENT_HOST.
- elasticsearch: Update
elasticsearchintegration to add support foropensearch-py. See the elasticsearch documentation for more information. - ASM: New Application Security Events Tracking API, starting with the functions
track_user_login_success_eventand
track_user_login_failure_eventfor tracking user logins (it will also internally callset_user) andtrack_custom_eventfor any custom events. You can find these functions in theddtrace.appsec.trace_utilsmodule. Calling these functions will create new tags under theappsec.eventsnamespace (appsec.events.user.loginfor logins) allowing you to track these events with Datadog. In the future this will be used to provide protection against account takeover attacks (ATO). Public documentation will be online soon. - tornado: Support custom error codes: https://ddtrace.readthedocs.io/en/stable/advanced_usage.html#custom-error-codes.
- CI Visibility: Support reliably linking tests to the pipeline that executed them.
Known Issues
- profiling: There is currently a known Python 3.11 compatibility issue where the stack collector does not properly access
PyFrameObjectmember values, asPyFrameObjectis now created and computed lazily in Python 3.11. Until this is fixed, we advise against enabling the profiler while using Python 3.11. - profiling: There is currently a known performance regression issue with the profiler's code provenance feature. Note that this feature is disabled by default and will only be enabled if
DD_PROFILING_ENABLE_CODE_PROVENANCEis set to true.
Bug Fixes
- This fix improves a cryptic error message encountered during some
pip install ddtraceruns under pip versions <18. - profiling: This fix resolves an issue in Python 3.11 where a PyFrameObject strong reference count was not properly decremented in the stack collector.
Other Changes
- profiler: CPU overhead reduction.
1.7.3
1.7.2
Bug Fixes
- Fix for ValueError when
@is not present in network location but other part of the url.
1.6.6
Bug Fixes
- Fix for ValueError when
@is not present in network location but other part of the url.
0.61.5
Bug Fixes
- Fix for ValueError when
@is not present in network location but other part of the url.
1.7.1
Bug Fixes
- This fix removes unintended url parts in the
http.urltag.
1.6.5
Bug Fixes
- This fix removes unintended url parts in the
http.urltag.
0.61.4
Bug Fixes
- This fix removes unintended url parts in the
http.urltag.
1.7.0
Upgrade Notes
- The default propagation style configuration changes to
DD_TRACE_PROPAGATION_STYLE=tracecontext,datadog. To only support Datadog propagation and retain the existing default behavior, setDD_TRACE_PROPAGATION_STYLE=datadog. - tracer: support for Datadog Agent v5 has been dropped. Datadog Agent v5 is no longer supported since
ddtrace==1.0.0. See https://ddtrace.readthedocs.io/en/v1.0.0/versioning.html#release-support for the version support. - The configured styles in
DD_TRACE_PROPAGATION_STYLE_EXTRACTare now evaluated in order to specification. To keep the previous fixed evaluation order, set:DD_TRACE_PROPAGATION_STYLE_EXTRACT=datadog,b3,b3 single header. - tracing: upgrades the default trace API version to
v0.5for non-Windows systems. Thev0.5trace API version generates smaller payloads, thus increasing the throughput to the Datadog agent especially with larger traces. - tracing: configuring the
v0.5trace API version on Windows machines will raise aRuntimeErrordue to known compatibility issues. Please see #4829 for more details.
Deprecation Notes
- propagation: Configuration of propagation style with
DD_TRACE_PROPAGATION_STYLE=b3is deprecated and will be removed in version 2.0.0. Please use the newly addedDD_TRACE_PROPAGATION_STYLE=b3multiinstead. - aws: The boto, botocore and aiobotocore integrations no longer include all API parameters by default. To retain the deprecated behavior, set the environment variable
DD_AWS_TAG_ALL_PARAMS=1. The deprecated behavior and environment variable will be removed in v2.0.0.
New Features
- django: add configuration option to allow a resource format like
{method}{handler}.{url_name}in projects with Django <2.2.0 - django: Adds the
DD_DJANGO_INCLUDE_USER_NAMEoption to toggle whether the integration sets thedjango.user.nametag. - Added environment variable
DD_TRACE_PROPAGATION_STYLEto configure both injection and extraction propagation styles. The configured styles can be overridden with environment variablesDD_TRACE_PROPAGATION_STYLE_INJECTandDD_TRACE_PROPAGATION_STYLE_EXTRACT. - tracing: This introduces
noneas a supported propagator for trace context extraction and injection. Whennoneis the only propagator listed, the corresponding trace context operation is disabled. If there are other propagators in the inject or extract list, the none propagator has no effect. For exampleDD_TRACE_PROPAGATION_STYLE=none - tracing: Adds support for W3C Trace Context propagation style for distributed tracing. The
traceparentandtracestateHTTP headers are enabled by default for all incoming and outgoing HTTP request headers. The Datadog propagation style continue to be enabled by default. - flask: Adds support for streamed responses. Note that two additional spans:
flask.applicationandflask.responsewill be generated. - profiling: Adds support for Python 3.11.
- celery: Enhances context tags containing dictionaries so that their contents are sent as individual tags (issue #4771).
- ASM: One click activation enabled by default using Remote Configuration Management (RCM). Set
DD_REMOTE_CONFIGURATION_ENABLED=falseto disable this feature.
Bug Fixes
- ASGI: response headers are correctly processed instead of ignored
- ASM: Do not raise exceptions when failing to parse XML request body.
- ASM: fix a body read problem on some corner case where don't passing the content length makes wsgi.input.read() blocks.
- aws: We are reducing the number of API parameters that the boto, botocore and aiobotocore integrations collect as span tags by default. This change limits span tags to a narrow set of parameters for specific AWS APIs using standard tag names. To opt out of the new default behavior and collect no API parameters, set the environment variable
DD_AWS_TAG_NO_PARAMS=1. To retain the deprecated behavior and collect all API parameters, set the environment variableDD_AWS_TAG_ALL_PARAMS=1. - Remove
forbiddenfruitas dependency and rollbackwraptchanges whereforbiddenfruitwas called. IAST: Patch builtins only when IAST is enabled. - httpx: Fixes an incompatibility from
httpx==0.23.1when theURL.rawproperty is not available. - Fix error in patching functions.
forbiddenfruitpackage has conflicts with some libraries such asasynctest. This conflict raisesAttributeErrorexception. See issue #4484. - tracer: This fix resolves an issue where the rate limiter used for span and trace sampling rules did not reset the time since last call properly if the rate limiter already had max tokens. This fix resets the time since last call always, which leads to more accurate rate limiting.
- Ensure that worker threads that run on start-up are recreated at the right time after fork on Python < 3.7.
- tracing: This fix resolves an issue where the
DD_SERVICE_MAPPINGmapped service names were not used when updating span metadata with theDD_VERSIONset version string. - wsgi: This fix resolves an issue where
BaseExceptionraised in a WSGI application caused spans to not be submitted. - library injection: Pin the library version in the library injection image. Prior, the latest version of
ddtracewould always be installed, regardless of the image version. - Fix error in the agent response payload when the user disabled ASM in a dashboard using 1-click Remote Configuration.
- The specification of
DD_TRACE_PROPAGATION_STYLE_EXTRACTnow respects the configured styles evaluation order. The evaluation order had previously been fixed and so the configured order was ignored. - tracing: Ensures that encoding errors due to wrong span tag types will be logged. Previously, if non-text span tags were set, this resulted in v0.5 encoding errors to be output to
stderrinstead of to a logger. - dynamic instrumentation: Remove unnecessary log line from application start up
- botocore: Before this change, the botocore integration stripped newlines from the JSON string encoded in the data blob of Amazon Kinesis records. This change includes a terminating newline if it is present in the decoded data.
- telemetry: This fix resolves an issue when we try to fetch
platform.libc_ver()on an unsupported system.
Known Issues
- profiling: There is currently a known performance regression issue with the profiler's code provenance feature. Note that this feature is disabled by default and will only be enabled if
DD_PROFILING_ENABLE_CODE_PROVENANCEis set to true.
Other Changes
- Kubernetes library injection: run commands as non-root user.
- tracing: The value of
ddtrace.constants.PIDhas been changed from system.pid to process_id. All spans will now use the metric tag of process_id instead. - tracing: The exception logged for writing errors no longer includes a long, unhelpful stack trace. The message now also includes the number of traces dropped and the number of retries attempted.
1.7.0rc4
Known Issues
- profiling: There is currently a known performance regression issue with the profiler's code provenance feature. Note that this feature is disabled by default and will only be enabled if
DD_PROFILING_ENABLE_CODE_PROVENANCEis set to true.