github DataDog/dd-trace-py v1.18.0
1.18.0

latest releases: v2.16.1, v2.14.7, v2.15.2...
15 months ago

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.

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_PATTERN and DD_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 pytest support for the Intelligent Test Runner .

  • openai: tiktoken has 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, install ddtrace[openai] or tiktoken. If tiktoken is 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.

Deprecation Notes

  • DD_CALL_BASIC_CONFIG will be removed in the upcoming 2.0.0 release. As an alternative to DD_CALL_BASIC_CONFIG, you can call logging.basicConfig() to configure logging in your application.
  • DD_LOG_FORMAT is 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.

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 cmake from install_requires to setup_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 ERROR in 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 an ArgumentError.

  • langchain: This fix resolves an issue where langchain.embeddings.HuggingFaceEmbeddings embedding
    methods, and langchain.vectorstores.Milvus.similarity_search were patched twice due to a nested class hierarchy in langchain.

  • 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 UnicodeDecodeError raised 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.

Don't miss a new dd-trace-py release

NewReleases is sending notifications on new releases.