Releases: DataDog/dd-trace-py
1.7.0rc3
New Features
- ASM: One click activation enabled by default using Remote Configuration Management (RCM). Set
DD_REMOTE_CONFIGURATION_ENABLED=falseto disable this feature.
Bug Fixes
- 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.
1.6.4
Deprecation Notes
- 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.
Bug Fixes
- 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. - 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. - 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.
1.5.5
1.7.0rc2
1.7.0rc1
v1.7.0rc1
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 docs for the version support.
- The configured styles in
DD_TRACE_PROPAGATION_STYLE_EXTRACTare now evaluated in the specified order. 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.5. Thev0.5trace API version generates smaller payloads, thus increasing the throughput to the Datadog agent especially with larger traces.
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. - tracing: 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: Enables code provenance by default. To keep the feature disabled use
DD_PROFILING_ENABLE_CODE_PROVENANCE=false. - profiling: Adds support for Python 3.11.
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. - library: 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. - ASM: Fix error in the agent response payload when the user disabled ASM in a dashboard using 1-click Remote Configuration.
- tracing: 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.
Other Changes
- Kubernetes library injection: run commands as non-root user.
- tracing: The value of
ddtrace.constants.PIDhas been changed fromsystem.pidtoprocess_id. All spans will now use the metric tag ofprocess_idinstead. - 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.6.3
Bug Fixes
- httpx: Fixes an incompatibility from
httpx==0.23.1when theURL.rawproperty is not available.
1.6.2
1.6.1
Bug Fixes
- ASGI: response headers are correctly processed instead of ignored
- ASM: fix a Flask body read problem on some corner case where not passing the content length makes wsgi.input.read() blocks.
- ASM: Remove
forbiddenfruitas dependency and rollbackwraptchanges whereforbiddenfruitwas called (fixes #4484). - IAST: Patch builtins only when IAST is enabled.
- ASM: Fix error in the agent response payload when the user disabled ASM in a dashboard using 1-click Remote Configuration.
1.5.4
Bug Fixes
- ASM: fix a body read problem on some corner case where don't passing the content length makes wsgi.input.read() block.
- tracing: make
ddtrace.context.Contextserializable which fixes distributed tracing across processes. - django: avoid
SynchronousOnlyOperationwhen failing to retrieve user information. - flask: add support for flask v2.3. Remove deprecated usages of
flask._app_ctx_stackandflask._request_ctx_stack.
1.6.0
Prelude
Initial library support has been added for Python 3.11. Continuous Profiler and Dynamic Instrumentation are not yet compatible and must be disabled in order to use the library with Python 3.11. Support for Continuous Profiler and Dynamic Instrumentation will be added in a future release. To track the status, see the Support Python 3.11 issue on GitHub.
Application Security Management (ASM) has added support for preventing attacks by blocking malicious IPs using one click within Datadog.
NOTE: One click activation for ASM is currently in beta.
Dynamic instrumentation allows instrumenting a running service dynamically to extract runtime information that could be useful for, e.g., debugging purposes, or to add extra metrics without having to make code changes and re-deploy the service. See https://ddtrace.readthedocs.io/en/stable/configuration.html for more details.
New Features
- ASM: add support for one click activation using Remote Configuration Management (RCM). Set
DD_REMOTE_CONFIGURATION_ENABLED=trueto enable this feature. - ASM: ip address collection will be enabled if not explicitly disabled and appsec is enabled.
- tracing: HTTP query string tagged by default in http.url tag (sensitive query strings will be obfuscated).
- Django: set
usr.idtag by default ifrequest.useris authenticated. - Introduced the public interface for the dynamic instrumentation service. See https://ddtrace.readthedocs.io/en/stable/configuration.html for more details.
- Add
Span.set_tag_str()as an alternative to the overloaded functionality ofSpan.set_tag()when the value can be coerced to unicode text. - Enable
telemetry <Instrumentation Telemetry>collection when tracing is enabled. - ASM: now http.client_ip and network.client.ip will only be collected if ASM is enabled.
- tracer: added support for Python 3.11.
Upgrade Notes
- Pin attrs dependency to version
>=20due to incompatibility with cattrs version22.1.0. - Use
Span.set_tag_str()instead ofSpan.set_tag()when the tag value is a text type as a performance optimizations in manual instrumentation. - Python 3.11: Continuous Profiler and Dynamic Instrumentation must be disabled as they do not currently support Python 3.11.
Bug Fixes
- ASM: only report actor.ip on attack.
- aioredis: added exception handling for
CancelledErrorin the aioredis integration. - CI Visibility: fixed AppVeyor integration not extracting the full commit message.
- Add iterable methods on TracedCursor. Previously these were not present and would cause iterable usage of cursors in DB API integrations to fail.
- Fix parsing of the
DD_TAGSenvironment variable value to include support for values with colons (e.g. URLs). Also fixed the parsing of invalid tags that begin with a space (e.g.DD_TAGS=" key:val"will now produce a tag with labelkey, instead ofkey, and valueval). - opentracing: don't raise an exception when distributed tracing headers are not present when attempting to extract.
- sqlite3: fix error when using
connection.backupmethod. - Change dependency from
backport_ipaddresstoipaddress. Only installipaddressfor Python < 3.7. - gevent: disable gevent after fork hook which could result in a performance regression.
- profiling: restart automatically on all Python versions.
- profiling: fixes an issue with Gunicorn child processes not storing profiling events.
- wsgi: when using more than one nested wsgi traced middleware in the same app ensure wsgi spans have the correct parenting.
- Fix issue with
attrsandcontextlib2version constraints for Python 2.7. - tracing: make
ddtrace.context.Contextserializable which fixes distributed tracing across processes. - flask: add support for flask v2.3. Remove deprecated usages of
flask._app_ctx_stackandflask._request_ctx_stack. - CGroup file parsing was fixed to correctly parse container UUID for PCF containers.
- django: avoid
SynchronousOnlyOperationwhen failing to retrieve user information.
Other Notes
- tracing: add http.route tag to root span for Flask framework.