Releases: DataDog/dd-trace-py
1.18.0rc1
Prelude
Data Streams Monitoring (DSM) has added support for AWS Kinesis
Breaking change for CI Visibility: test.suite and test.full_name are changed, so any visualization or monitor that uses these fields is potentially affected.
Deprecation Notes
DD_CALL_BASIC_CONFIGwill be removed in the upcoming 2.0.0 release. As an alternative toDD_CALL_BASIC_CONFIG, you can calllogging.basicConfig()to configure logging in your application.DD_LOG_FORMATis deprecated and will be removed in 2.0.0. As an alternative, please follow the log injection formatting as provided in the log injection docs.
New Features
-
CI Visibility: added tracing support for pytest-benchmark
-
ASM: The vulnerability report now includes a feature to scrub potentially sensitive information. This scrubbing process looks for common patterns, and it can be further expanded using environment variables such as
DD_IAST_REDACTION_NAME_PATTERNandDD_IAST_REDACTION_VALUE_PATTERN. See the docs for more information. -
DSM: Adds DSM support for AWS Kinesis. For information about DSM, see the official documentation. This change requires users to use botocore version 1.26.30 or later and update calls to Kinesis' PutRecord, PutRecords, and GetRecords calls with the StreamARN argument.
-
pytest: This change introduces an option to the pytest plugin to disable ddtrace:
--no-ddtrace -
CI visibility: Adds support for tracking repository URLs via the BITBUCKET_GIT_HTTP_ORIGIN environment variable
-
CI visibility: Adds CodeFresh integration
-
CI Visibility: Beta release of
pytestsupport for the Intelligent Test Runner . -
openai:
tiktokenhas been introduced as an optional package dependency to calculate the number of
tokens used in a prompt for a streamed completion or streamed chat completion. To enable this feature, installddtrace[openai]ortiktoken. Iftiktokenis not installed, the prompt token count will be continue to be estimated instead. -
Allows the use of a new backend for storing and exporting profiling data. This feature can be enabled for now by setting the DD_PROFILING_EXPORT_LIBDD_ENABLED environment variable to true. This should improve performance while decreasing memory overhead.
Known Issues
- sqlalchemy: sqlalchemy rollbacks can intermittently cause deadlocks in some cases. If experiencing this issue, set
DD_TRACE_SPAN_AGGREGATOR_RLOCK=True. After testing and feedback we intend to make True the default value.
Bug Fixes
-
CI Visibility: fixes an issue where the CIVisibility client would raise an exception if it was started in agentless mode without the DD_API_KEY set
-
core: This fix moves
cmakefrominstall_requirestosetup_requires. -
data_streams: This change fixes a bug in the Kafka & SQS integrations in which the Data Streams product code incorrect set timestamps for statistics. This led to all points being submitted for the same timestamp (the start of the application).
-
dynamic instrumentation: handle null literal in conditions and expressions.
-
dynamic instrumentation: fixed a bug that prevented span decoration probes from being received and instrumented.
-
dynamic instrumentation: ensure that probes that fail to be instrumented because of invalid conditions/expressions are reported with status
ERRORin the UI. -
CI Visibility: This fix solves an issue where the git unshallow command wasn't called
-
tracing: Ensures health metrics are tagged with the correct values.
-
CI Visibility: This fix resolves an issue where test skipping was not working properly.
-
langchain: This fix resolves an issue where chat messages and embedding arguments
passed in as keyword arguments were not parsed correctly and resulted in anArgumentError. -
langchain: This fix resolves an issue where
langchain.embeddings.HuggingFaceEmbeddingsembedding
methods, andlangchain.vectorstores.Milvus.similarity_searchwere patched twice due to a nested class hierarchy inlangchain. -
profiling: prevent deadlocks while recording events of different type.
-
pytest: This fix resolves an issue where test modules could be non-existent, causing errors in the CI Visibility product.
-
CI visibility: fix version and step arguments gathering to enable plugin compatibility with pytest-bdd 6.1.x
-
kafka: Resolves
UnicodeDecodeErrorraised when kafka messages key contain characters that are not supported by UTF-8 encoding. -
lib-injection: Adds support for non-root run applications in containers.
-
This fix resolves an issue causing span tags used by the Datadog backend not to be inherited by spans that exist in a different process from their parents.
Other Changes
- tracing: Previously the maximum size of a span tag was set to the full size of trace writer buffer (via DD_TRACE_WRITER_BUFFER_SIZE_BYTES). With this change the maximum size of span tags will be set to 10% of the size of the writer's buffer. This should decrease the frequency of encoding errors due to large span tags.
1.17.3
Bug Fixes
-
CI Visibility: This fix solves an issue where the git unshallow command wasn't called
-
CI Visibility: This fix resolves an issue where test skipping was not working properly.
-
langchain: This fix resolves an issue where chat messages and embedding arguments
passed in as keyword arguments were not parsed correctly and resulted in anArgumentError. -
langchain: This fix resolves an issue where
langchain.embeddings.HuggingFaceEmbeddingsembedding
methods, andlangchain.vectorstores.Milvus.similarity_searchwere patched twice due to a nested class hierarchy inlangchain. -
kafka: Resolves
UnicodeDecodeErrorraised when kafka messages key contain characters that are not supported by UTF-8 encoding.
1.17.2
Known Issues
- sqlalchemy: sqlalchemy rollbacks can intermittently cause deadlocks in some cases. If experiencing this issue, set
DD_TRACE_SPAN_AGGREGATOR_RLOCK=True. After testing and feedback we intend to make True the default value.
Bug Fixes
- core: This fix moves
cmakefrominstall_requirestosetup_requires. - dynamic instrumentation: handle null literal in conditions and expressions.
- dynamic instrumentation: fixed a bug that prevented span decoration probes from being received and instrumented.
- dynamic instrumentation: ensure that probes that fail to be instrumented because of invalid conditions/expressions are reported with status
ERRORin the UI.
1.17.1
Prelude
Breaking change for CI Visibility: test.suite and test.full_name are changed, so any visualization or monitor that uses these fields is potentially affected
Bug Fixes
- pytest: This fix resolves an issue where test modules could be non-existent, causing errors in the CI Visibility product.
- lib-injection: Adds support for non-root run applications in containers.
1.17.0
Prelude
Datadog has added support for automatically creating login success or failure events when a configured Django authentication backend is used. This will automatically fill the following tags in these cases:
- appsec.events.users.login.success.track
- appsec.events.users.login.failure.track
- appsec.events.users.login.success.[email|login|username]
- appsec.events.users.login.failure.usr.exists
New Features
- ASM: Add support for automatic user login events in Django.
- langchain: Adds integration with support for metrics, logs, and traces from LangChain requests.
See the docs for more information. - redis: Add support for Async RedisCluster.
Bug Fixes
- profiling: prevent deadlocks while recording events of different type.- core: This fix removes the inclusion of our
benchmarks/directory in theddtracewheels. - internal: call
_fixupChildrenwhen retrievingDDLogger - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- profiling: Handles a race condition, which would occasionally throw an error, which would read
"RuntimeError: the memalloc module was not started." - CI visibility: fix version and step arguments gathering to enable plugin compatibility with pytest-bdd 6.1.x
- Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- tracing: This fix resolves a
google.protobufimport error when module unloading. - wsgi: This fix resolves an issues when trying to parse the
environpropertyHTTPSas an HTTP header. - Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code. - telemetry: resolves issue with sending unnecessary duplicate logs
1.17.0rc1
Prelude
Datadog has added support for automatically creating login success or failure events when a configured Django authentication backend is used. This will automatically fill the following tags in these cases:
- appsec.events.users.login.success.track
- appsec.events.users.login.failure.track
- appsec.events.users.login.success.[email|login|username]
- appsec.events.users.login.failure.usr.exists
New Features
-
ASM: Add support for automatic user login events in Django.
-
langchain: Adds integration with support for metrics, logs, and traces from LangChain requests.
See the docs for more information. -
redis: Add support for Async RedisCluster.
Bug Fixes
- core: This fix removes the inclusion of our
benchmarks/directory in theddtracewheels. - internal: call
_fixupChildrenwhen retrievingDDLogger - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- profiling: Handles a race condition, which would occasionally throw an error, which would read
"RuntimeError: the memalloc module was not started." - CI visibility: fix version and step arguments gathering to enable plugin compatibility with pytest-bdd 6.1.x
- Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- tracing: This fix resolves a
google.protobufimport error when module unloading. - wsgi: This fix resolves an issues when trying to parse the
environpropertyHTTPSas an HTTP header. - Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code. - telemetry: resolves issue with sending unnecessary duplicate logs
1.16.1
Bug Fixes
- botocore: Enables Data Streams Monitoring for SQS when MessageAttributes are passed in as a tuple in addition to when they are passed in as a list.
- core: This fix removes the inclusion of our
benchmarks/directory in theddtracewheels. - internal: call
_fixupChildrenwhen retrievingDDLogger - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- profiling: Handles a race condition, which would occasionally throw an error, which would read
"RuntimeError: the memalloc module was not started." - Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- tracing: This fix resolves a
google.protobufimport error when module unloading. - wsgi: This fix resolves an issues when trying to parse the
environpropertyHTTPSas an HTTP header. - Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code.
1.15.2
New Features
- CI Visibility: Updates how pytest modules and test suites are reported. Modules names are now set to the fully qualified name, whereas test suites will be set to the file name.
Before this change: {"module": "tests", "suite":"my_module/tests/test_suite.py"} After this change: {"module": "my_module.tests", "suite": "test_suite.py"}
Bug Fixes
- Fixed an issue that prevented the library from working as expected when a combination of gevent and asyncio-based frameworks that rely on the functionalities of the ssl module is used.
- internal: call
_fixupChildrenwhen retrievingDDLogger - openai: Fixes the issue with
ImportErrorofTypedDictfromtypingmodule in Python 3.7. - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- profiling: Handles a race condition, which would occasionally throw an error, which would read
"RuntimeError: the memalloc module was not started." - pytest: This fix resolves an issue where failures and non-skipped tests were not propagated properly when unittest.TestCase classes were used.
- Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- wsgi: This fix resolves an issues when trying to parse the
environpropertyHTTPSas an HTTP header. - Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code. - telemetry: resolves issue with sending unnecessary duplicate logs
1.14.3
Bug Fixes
- openai: Fixes the issue with
ImportErrorofTypedDictfromtypingmodule in Python 3.7. - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- pytest: This fix resolves an issue where failures and non-skipped tests were not propagated properly when unittest.TestCase classes were used.
- Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- tracing: This fix resolves an issue where negative trace ID values were allowed to propagate via Datadog distributed tracing HTTP headers.
- Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code.
1.13.6
Bug Fixes
- openai: Fixes the issue with
ImportErrorofTypedDictfromtypingmodule in Python 3.7. - profiling: Fixed a regression whereby the profile exporter would not handle known request errors and asks the user to report an issue instead.
- Fixed a bug that caused applications using gevent and cassandra to fail to start with the ddtrace-run command.
- tracing: This fix resolves an issue where negative trace ID values were allowed to propagate via Datadog distributed tracing HTTP headers.
- Pin
cython<3due to an incompatibility withcython==3.0.0and typing annotations in profiling code.