Skip to content

Releases: DataDog/dd-trace-py

2.2.3

17 Jan 16:18
4badc2c

Choose a tag to compare

Bug Fixes

  • IAST: Don't split AST Assign nodes since it's not needed for propagation to work.
  • Vulnerability Management for Code-level (IAST): Cookies vulnerabilities are only reported if response cookies are insecure.
  • Vulnerability Management for Code-level (IAST): Ensure that Cookies vulnerabilities report only the cookie name.
  • Vulnerability Management for Code-level (IAST): Fix an unhandled ValueError in ast_function thrown in some cases (i.e. Numpy arrays when converted to bool).
  • psycopg: This fix resolves an issue where exceptions originating from asynchronous Psycopg cursors were not propagated up the call stack.

2.5.0rc1

11 Jan 17:52
0334372

Choose a tag to compare

2.5.0rc1 Pre-release
Pre-release

New Features

  • aiohttp: add split_by_domain config to split service name by domain
  • CI Visibility: Adds code coverage lines covered tag for pytest and unittest.
  • aiohttp: Adds http.route tag to aiohttp.request spans.
  • bottle: Adds http.route tag to bottle.request spans.
  • falcon: Adds http.route tag to falcon.request spans.
  • molten: Adds http.route tag to molten.request spans.
  • Adds distributed tracing for confluent-kafka integration. Distributed tracing connects Kafka consumer spans with Kafka producer spans within the same trace if a message is valid. To enable distributed tracing, set the configuration: DD_KAFKA_DISTRIBUTED_TRACING_ENABLED=True for both the consumer and producer service.
  • ASM: This introduces (experimental) api security support for fastAPI. Flask and Django were already supported in 2.4.0. Support schema computation on all addresses (requests and responses) and scanner support for pii, credentials and payment data.
  • CI Visibility: introduces a CI visibility-specific logger (enabled for the pytest plugin), enabled by setting the DD_CIVISIBILITY_LOG_LEVEL environment variable (with the same level names as Python logging levels).
  • CI Visibility: allows for waiting for the git metadata upload to complete before deciding whether or not to enable coverage (based on API response).
  • Further lazy loads telemetry_writer so that it is not running when explicitly disabled. Users must explicitly set "DD_INSTRUMENTATION_TELEMETRY_ENABLED=false".
  • tracer: Add support for remotely configuring trace tags.

Bug Fixes

  • loguru: Ensures log correlation is enabled when the root logger is initialized. Previously, log correlation was only enabled when a new sink was added.
  • Fix compatibility with other tools that try to infer the type of a Python object at runtime.
  • tracing: Fixes a bug that prevents span links from being visualized in the Datadog UI.
  • tracing: Resolves span encoding errors raised when span links do not contain expected types
  • ASM: This fix resolves an issue where custom event boolean properties were not reported as true and false like other tracers but as True and False.
  • Vulnerability Management for Code-level (IAST): Ensure that Cookies vulnerabilities report only the cookie name.
  • langchain: This fix resolves an get_openai_token_cost_for_model import error in langhcain version 0.0.351 or later.
  • ASM: This fix resolves an issue where IAST could cause circular dependency at startup.
  • tracing: Ensures all fields in ddtrace.context.Context are picklable.
  • pytest: This fix resolves an issue where the --no-cov flag did not take precedence over the --cov flag when deciding whether to report code coverage on spans.
  • rq: Fixed a bug where the RQ integration would emit a warning when setting job.status span tag.

2.4.0

20 Dec 16:06
c739c60

Choose a tag to compare

New Features

  • ASM: dependency telemetry metrics now will only report dependencies actually in use (imported) and will also report new imported modules periodically.

  • ASM: This introduces Threat Monitoring and Blocking on FastAPI.

    • IP Blocking and all input addresses are supported on requests and responses
    • Custom Blocking (This does not contain user blocking specific features yet).
  • Vulnerability Management for Code-level (IAST): Adds Python 3.12 compatibility

  • tracing: Introduces support for OpenTracing Baggage Items with HTTP Propagation. Enable this support by DD_TRACE_PROPAGATION_HTTP_BAGGAGE_ENABLED=true. The Context._set_baggage_item and Context._get_baggage_item internal methods are provided for manual modifications to the Baggage Items. These API changes are subject to change.

  • dynamic instrumentation: Add support for more built-in container types, such as defaultdict, frozenset, OrderedDict and Counter.

  • Optionally lazy loads and disables Instrumentation Telemetry. Users must explicitly set "DD_INSTRUMENTATION_TELEMETRY_ENABLED=false".

  • tracer: Add support for remotely setting the trace sample rate from the Datadog UI. This functionality is enabled by default when using ddtrace-run and library injection. To enable it when using the library manually, use ddtrace.config.enable_remote_config().

Upgrade Notes

  • This removes the pylons integration, which does not support Python 3.

Deprecation Notes

  • aioredis: The aioredis integration is deprecated and will be removed in a future version. As an alternative to the aioredis integration, you can use the redis integration with redis>=4.2.0.

Bug Fixes

  • ASM: This fix resolves an issue where IAST could cause circular dependency at startup.
  • Vulnerability Management for Code-level (IAST): Cookies vulnerabilities are only reported if response cookies are insecure.
  • Vulnerability Management for Code-level (IAST): Fix propagation error on .format string method.
  • Vulnerability Management for Code-level (IAST): Ensure that Cookies vulnerabilities report only the cookie name.
  • Vulnerability Management for Code-level (IAST): This fix resolves an issue where certain aspects incorrectly expected at least one argument, leading to an IndexError when none were provided. The solution removes this constraint and incorporates regression tests for stability assurance.
  • tracing: Resolves span encoding errors raised when span links do not contain expected types
  • tracer: tag spans that have been sampled due to an Agent sampling configuration.
  • lambda: This change disables the use of multiprocessing.queue in Lambda, because it is not supported in Lambda
  • langchain: This fix resolves a crash that could occur during embedding when no embeddings are found.
  • Fix a regression with the support for gevent that could have occurred if some products, like ASM, telemetry, were enabled.
  • kafka: Resolves TypeError raised by serializing producers and deserializing consumers when the message.key tag is set on spans.
  • dynamic instrumentation: Fix an issue that caused the instrumented application to fail to start if a non-standard module was imported.
  • openai: This fix resolves an issue where tagging image inputs in the chat completions endpoint resulted in attribute errors.
  • openai: This fix resolves an issue where requesting raw API responses from openai>=1.0 resulted in attribute errors while tagging.
  • profiling: Fix an issue that prevented threading locks from being traced when using gevent.
  • profiling: Fix a segmentation fault with CPython 3.12 when sampling thread stacks.
  • pylibmc: Fixes an issue where using ddtrace-run or ddtrace.patch_all() with DD_TRACE_ENABLED=False would break with get, gets, and get_multi operations on pylibmc Clients.
  • tracing: This fix resolves an issue where concurrent mutations to the context._meta dict caused RuntimeError: dictionary changed size during iteration.
  • django: Resolves AttributeError raised by traced StreamingHttpResponse.
  • requests: Updates the resource names of requests.requests spans to include the method and path of the request.
  • propagation: This fix resolves an issue where a Context generated from extracted headers could lack a span_id or trace_id, leading SpanLink encoding errors.
  • psycopg: This fix resolves an issue where a circular import of the psycopg library could cause a crash during monkeypatching.
  • psycopg: This fix resolves an issue where exceptions originating from asynchronous Psycopg cursors were not propagated up the call stack.
  • redis: This fix resolves an issue where the yaaredis and aredis integrations imported code from the redis integration, causing a circular import error.
  • tracing: Resolves trace encoding errors raised when DD_TRACE_API_VERSION is set to v0.5 and a BufferFull Exception is raised by the TraceWriter. This fix ensures span fields are not overwritten and reduces the frequency of 4XX errors in the trace agent.

Other Changes

  • tracing: Upgrades the trace encoding format to v0.5. This change improves the performance of encoding and sending spans.

2.3.3

19 Dec 18:27
e0a2630

Choose a tag to compare

Bug Fixes

  • tracing: Resolves span encoding errors raised when span links do not contain expected types
  • Vulnerability Management for Code-level (IAST): Cookies vulnerabilities are only reported if response cookies are insecure.
  • Vulnerability Management for Code-level (IAST): Ensure that Cookies vulnerabilities report only the cookie name.
  • psycopg: This fix resolves an issue where exceptions originating from asynchronous Psycopg cursors were not propagated up the call stack.

1.20.16

15 Dec 10:04
8b40698

Choose a tag to compare

Bug Fixes

  • kafka: Resolves TypeError raised by serializing producers and deserializing consumers when the message.key tag is set on spans.
  • Vulnerability Management for Code-level (IAST): Cookies vulnerabilities are only reported if response cookies are insecure.
  • Vulnerability Management for Code-level (IAST): Ensure that Cookies vulnerabilities report only the cookie name.
  • psycopg: This fix resolves an issue where exceptions originating from asynchronous Psycopg cursors were not propagated up the call stack.

2.4.0rc1

13 Dec 20:45
a254b7a

Choose a tag to compare

2.4.0rc1 Pre-release
Pre-release

Upgrade Notes

  • pylons: Removes the pylons integration, which does not support Python 3.

Deprecation Notes

  • aioredis: The aioredis integration is deprecated and will be removed in a future version. As an alternative to the aioredis integration, you can use the redis integration with redis>=4.2.0.

New Features

  • ASM: dependency telemetry metrics now will only report dependencies actually in use (imported) and will also report new imported modules periodically.

  • ASM: This introduces Threat Monitoring and Blocking on FastAPI. Includes IP Blocking and all input addresses are supported on requests and responses as well as Custom Blocking but this does not contain user blocking specific features yet.

  • tracing: Introduces support for OpenTracing Baggage Items with HTTP Propagation. Enable this support by DD_TRACE_PROPAGATION_HTTP_BAGGAGE_ENABLED=true. The Context._set_baggage_item and Context._get_baggage_item internal methods are provided for manual modifications to the Baggage Items. These API changes are subject to change.

  • dynamic instrumentation: Add support for more built-in container types, such as defaultdict, frozenset, OrderedDict and Counter.

  • Vulnerability Management for Code-level (IAST): Adds Python 3.12 compatibility

  • perf: Lazy loads Instrumentation Telemetry. This improves tracer startup time when DD_INSTRUMENTATION_TELEMETRY_ENABLED=false is set.

  • tracer: Add support for remotely setting the trace sample rate from the Datadog UI. This functionality is enabled by default when using ddtrace-run and library injection. To enable it when using the library manually, use ddtrace.config.enable_remote_config().

Bug Fixes

  • tracer: tag spans that have been sampled due to an Agent sampling configuration.
  • lambda: This change disables the use of multiprocessing.queue in Lambda, because it is not supported in Lambda
  • langchain: This fix resolves a crash that could occur during embedding when no embeddings are found.
  • Fix a regression with the support for gevent that could have occurred if some products, like ASM, telemetry, were enabled.
  • kafka: Resolves TypeError raised by serializing producers and deserializing consumers when the message.key tag is set on spans.
  • dynamic instrumentation: Fix an issue that caused the instrumented application to fail to start if a non-standard module was imported.
  • openai: This fix resolves an issue where tagging image inputs in the chat completions endpoint resulted in attribute errors.
  • openai: This fix resolves an issue where requesting raw API responses from openai>=1.0 resulted in attribute errors while tagging.
  • profiling: Fix an issue that prevented threading locks from being traced when using gevent.
  • profiling: Fix a segmentation fault with CPython 3.12 when sampling thread stacks.
  • pylibmc: Fixes an issue where using ddtrace-run or ddtrace.patch_all() with DD_TRACE_ENABLED=False would break with get, gets, and get_multi operations on pylibmc Clients.
  • tracing: This fix resolves an issue where concurrent mutations to the context._meta dict caused RuntimeError: dictionary changed size during iteration.
  • django: Resolves AttributeError raised by traced StreamingHttpResponse.
  • Vulnerability Management for Code-level (IAST): This fix resolves an issue where certain aspects incorrectly expected at least one argument, leading to an IndexError when none were provided. The solution removes this constraint and incorporates regression tests for stability assurance.
  • Vulnerability Management for Code-level (IAST): Cookies vulnerabilities are only reported if response cookies are insecure.
  • Vulnerability Management for Code-level (IAST): Fix propagation error on .format string method.
  • requests: Updates the resource names of requests.requests spans to include the method and path of the request.
  • propagation: This fix resolves an issue where a Context generated from extracted headers could lack a span_id or trace_id, leading SpanLink encoding errors.
  • psycopg: This fix resolves an issue where a circular import of the psycopg library could cause a crash during monkeypatching.
  • psycopg: This fix resolves an issue where exceptions originating from asynchronous Psycopg cursors were not propagated up the call stack.
  • redis: This fix resolves an issue where the yaaredis and aredis integrations imported code from the redis integration, causing a circular import error.
  • tracing: Resolves trace encoding errors raised when DD_TRACE_API_VERSION is set to v0.5 and a BufferFull Exception is raised by the TraceWriter. This fix ensures span fields are not overwritten and reduces the frequency of 4XX errors in the trace agent.

Other Changes

  • tracing: Upgrades the trace encoding format to v0.5. This change improves the performance of encoding and sending spans.

2.3.2

12 Dec 15:59
c8e243a

Choose a tag to compare

Bug Fixes

  • gevent: Fix a regression with the support for gevent that could have occurred if some products, like ASM, telemetry, were enabled.
  • kafka: Resolves TypeError raised by serializing producers and deserializing consumers when the message.key tag is set on spans.
  • dynamic instrumentation: Fix an issue that caused the instrumented application to fail to start if a non-standard module was imported.
  • openai: This fix resolves an issue where tagging image inputs in the chat completions endpoint resulted in attribute errors.
  • openai: This fix resolves an issue where requesting raw API responses from openai>=1.0 resulted in attribute errors while tagging.
  • profiling: Fix an issue that prevented threading locks from being traced when using gevent.
  • profiling: Fix a segmentation fault with CPython 3.12 when sampling thread stacks.
  • pylibmc: Fixes an issue where using ddtrace-run or ddtrace.patch_all() with DD_TRACE_ENABLED=False would break with get, gets, and get_multi operations on pylibmc Clients.
  • django: Resolves AttributeError raised by traced StreamingHttpResponse.
  • Vulnerability Management for Code-level (IAST): This fix resolves an issue where certain aspects incorrectly expected at least one argument, leading to an IndexError when none were provided. The solution removes this constraint and incorporates regression tests for stability assurance.
  • psycopg: This fix resolves an issue where a circular import of the psycopg library could cause a crash during monkeypatching.
  • redis: This fix resolves an issue where the yaaredis and aredis integrations imported code from the redis integration, causing a circular import error.
  • tracing: Resolves trace encoding errors raised when DD_TRACE_API_VERSION is set to v0.5 and a BufferFull Exception is raised by the TraceWriter. This fix ensures span fields are not overwritten and reduces the frequency of 4XX errors in the trace agent.

2.2.2

12 Dec 16:00
72b3e41

Choose a tag to compare

Bug Fixes

  • CI Visibility: fixes the fact that the GITHUB_SERVER_URL environment variable was not being sanitized for credentials
  • lambda: This change disables the use of multiprocessing.queue in Lambda, because it is not supported in Lambda
  • gevent: Fix a regression with the support for gevent that could have occurred if some products, like ASM, telemetry, were enabled.
  • openai: This fix resolves an issue where tagging image inputs in the chat completions endpoint resulted in attribute errors.
  • openai: This fix resolves an issue where requesting raw API responses from openai>=1.0 resulted in attribute errors while tagging.
  • CI Visibility: Fixes an issue where a ValueError was raised when using different path drives on Windows
  • profiling: Fix a segmentation fault with CPython 3.12 when sampling thread stacks.
  • pylibmc: Fixes an issue where using ddtrace-run or ddtrace.patch_all() with DD_TRACE_ENABLED=False would break with get, gets, and get_multi operations on pylibmc Clients.
  • Fixes an issue where ddtrace could not be installed from source when using setuptools>=69 due to a change in the license field.
  • django: Resolves AttributeError raised by traced StreamingHttpResponse.
  • structlog: Fixes TypeError raised when ddtrace log processor is configured with a tuple
  • Vulnerability Management for Code-level (IAST): This fix resolves an issue where certain aspects incorrectly expected at least one argument, leading to an IndexError when none were provided. The solution removes this constraint and incorporates regression tests for stability assurance.
  • Vulnerability Management for Code-level (IAST): Generates cookies vulnerabilities report if IAST is enabled. Before this fix, Cookies vulnerabilities were only generated if both IAST and Appsec were enabled.
  • psycopg: This fix resolves an issue where a circular import of the psycopg library could cause a crash during monkeypatching.
  • redis: This fix resolves an issue where the yaaredis and aredis integrations imported code from the redis integration, causing a circular import error.

2.1.9

12 Dec 16:00
15f18b8

Choose a tag to compare

Bug Fixes

  • gevent: Fix a regression with the support for gevent that could have occurred if some products, like ASM, telemetry, were enabled.
  • profiling: Fix a segmentation fault with CPython 3.12 when sampling thread stacks.
  • tracing: This fix resolves an issue where concurrent mutations to the context._meta dict caused RuntimeError: dictionary changed size during iteration.
  • Fixes an issue where ddtrace could not be installed from source when using setuptools>=69 due to a change in the license field.
  • tracing: Fixes an issue where the thread responsible for sending traces is killed due to concurrent dictionary modification.
  • Vulnerability Management for Code-level (IAST): This fix resolves an issue where certain aspects incorrectly expected at least one argument, leading to an IndexError when none were provided. The solution removes this constraint and incorporates regression tests for stability assurance.
  • psycopg: This fix resolves an issue where a circular import of the psycopg library could cause a crash during monkeypatching.
  • redis: This fix resolves an issue where the yaaredis and aredis integrations imported code from the redis integration, causing a circular import error.

1.20.15

12 Dec 15:58
ffd9293

Choose a tag to compare

Bug Fixes

  • Vulnerability Management for Code-level (IAST): Fix propagation error on .format string method.
  • tracing: Resolves trace encoding errors raised when DD_TRACE_API_VERSION is set to v0.5 and a BufferFull Exception is raised by the TraceWriter. This fix ensures span fields are not overwritten and reduces the frequency of 4XX errors in the trace agent.