Releases: DataDog/dd-trace-py
2.2.3
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_functionthrown 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
New Features
- aiohttp: add split_by_domain config to split service name by domain
- CI Visibility: Adds code coverage lines covered tag for
pytestandunittest. - aiohttp: Adds http.route tag to
aiohttp.requestspans. - bottle: Adds http.route tag to
bottle.requestspans. - falcon: Adds http.route tag to
falcon.requestspans. - molten: Adds http.route tag to
molten.requestspans. - 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=Truefor 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
pytestplugin), enabled by setting theDD_CIVISIBILITY_LOG_LEVELenvironment 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_modelimport 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.Contextare 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.statusspan tag.
2.4.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.
- 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. TheContext._set_baggage_itemandContext._get_baggage_iteminternal 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,OrderedDictandCounter. -
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-runand library injection. To enable it when using the library manually, useddtrace.config.enable_remote_config().
Upgrade Notes
-
This removes the
pylonsintegration, 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
.formatstring 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.queuein 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
TypeErrorraised by serializing producers and deserializing consumers when themessage.keytag 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-runorddtrace.patch_all()withDD_TRACE_ENABLED=Falsewould break with get, gets, and get_multi operations on pylibmc Clients. - tracing: This fix resolves an issue where concurrent mutations to the
context._metadict caused RuntimeError: dictionary changed size during iteration. - django: Resolves
AttributeErrorraised by tracedStreamingHttpResponse. - requests: Updates the resource names of
requests.requestsspans to include the method and path of the request. - propagation: This fix resolves an issue where a
Contextgenerated from extracted headers could lack a span_id or trace_id, leadingSpanLinkencoding 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_VERSIONis set tov0.5and 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
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
Bug Fixes
- kafka: Resolves
TypeErrorraised by serializing producers and deserializing consumers when themessage.keytag 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
Upgrade Notes
- pylons: Removes the
pylonsintegration, 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. TheContext._set_baggage_itemandContext._get_baggage_iteminternal 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,OrderedDictandCounter. -
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=falseis set. -
tracer: Add support for remotely setting the trace sample rate from the Datadog UI. This functionality is enabled by default when using
ddtrace-runand library injection. To enable it when using the library manually, useddtrace.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.queuein 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
TypeErrorraised by serializing producers and deserializing consumers when themessage.keytag 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-runorddtrace.patch_all()withDD_TRACE_ENABLED=Falsewould break with get, gets, and get_multi operations on pylibmc Clients. - tracing: This fix resolves an issue where concurrent mutations to the
context._metadict caused RuntimeError: dictionary changed size during iteration. - django: Resolves
AttributeErrorraised by tracedStreamingHttpResponse. - 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
.formatstring method. - requests: Updates the resource names of
requests.requestsspans to include the method and path of the request. - propagation: This fix resolves an issue where a
Contextgenerated from extracted headers could lack a span_id or trace_id, leadingSpanLinkencoding 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_VERSIONis set tov0.5and 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
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
TypeErrorraised by serializing producers and deserializing consumers when themessage.keytag 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-runorddtrace.patch_all()withDD_TRACE_ENABLED=Falsewould break with get, gets, and get_multi operations on pylibmc Clients. - django: Resolves
AttributeErrorraised by tracedStreamingHttpResponse. - 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_VERSIONis set tov0.5and 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
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.queuein 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
ValueErrorwas 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-runorddtrace.patch_all()withDD_TRACE_ENABLED=Falsewould 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>=69due to a change in the license field. - django: Resolves
AttributeErrorraised by tracedStreamingHttpResponse. - structlog: Fixes
TypeErrorraised 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
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._metadict caused RuntimeError: dictionary changed size during iteration. - Fixes an issue where ddtrace could not be installed from source when using
setuptools>=69due 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
Bug Fixes
- Vulnerability Management for Code-level (IAST): Fix propagation error on
.formatstring method. - tracing: Resolves trace encoding errors raised when
DD_TRACE_API_VERSIONis set tov0.5and 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.