3.0.0rc1
Pre-release
Pre-release
·
18 commits
to 3.x-staging
since this release
Upgrade Notes
-
CI Visibility
-
Official release of the new version of the pytest plugin, introducing the following features:
- Auto Test Retries
- Early Flake Detection
- Improved coverage collection for Test Impact Analysis (formerly Intelligent Test Runner), using an internal collection method instead of coverage.py, with improved dependency discovery.
NOTE: this new version of the plugin introduces breaking changes:
module,suite, andtestnames are now parsed from theitem.nodeidattribute- test names now include the class for class-based tests
- Test skipping by Test Impact Analysis (formerly Intelligent Test Runner) is now done at the suite level, instead of at the test level
A beta version of the plugin had been available since v2.18.0, and could be enabled via the
DD_PYTEST_USE_NEW_PLUGIN_BETAenvironment variable. The new version is now the default, and the environment variable is not used anymore.
-
-
LLM Observability
- Support for the deprecated environment variable
DD_LLMOBS_APP_NAMEhas been removed. - Removes the deprecated
parametersargument fromLLMObs annotate(). Usemetadatainstead. openai: Drops tracing and LLM Observability support for OpenAI 0.x versions. To maintain support, upgrade toopenai>=1.0.- langchain: removed tracing support for
langchain.chains.base.Chains. To maintain support, migrate to using Langchain's LCEL instead. - langchain: Drops tracing and LLM Observability support for Langchain v0.0.x versions.
- Support for the deprecated environment variable
-
Profiling
- Bumps libdatadog dependency to v15.0.0.
-
Tracing
- Removes deprecated interfaces from all integrations.
- propagation: Setting
DD_TRACE_PROPAGATION_STYLEtob3 single headeris no longer supported. Useb3instead. aws_lambda: Drops support foraws_lambda<=6.105.0.
Deprecation Notes
-
ASM
- Deprecated env var
DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKINGis now removed. Please use the new env varDD_APPSEC_AUTO_USER_INSTRUMENTATION_MODEinstead.
- Deprecated env var
-
LLM Observability
- The
\_DD_LLMOBS_EVALUATORSenvironment variable is deprecated and will be removed in ddtrace 3.0.0.
As an alternative to\_DD_LLMOBS_EVALUATORS, you can use DD_LLMOBS_EVALUATORS instead. To migrate, replace\_DD_LLMOBS_EVALUATORSwithDD_LLMOBS_EVALUATORS. - The
\_DD_LLMOBS_EVALUATOR_SAMPLING_RULESenvironment variable is deprecated and will be removed in ddtrace 3.0.0.
As an alternative to\_DD_LLMOBS_EVALUATOR_SAMPLING_RULES, you can useDD_LLMOBS_EVALUATOR_SAMPLING_RULESinstead. To migrate, replace\_DD_LLMOBS_EVALUATOR_SAMPLING_RULESwithDD_LLMOBS_EVALUATOR_SAMPLING_RULES.
- The
-
Tracing
- Moves
ddtrace.provider.BaseContextProvidertoddtrace.trace.BaseContextProvider. Theddtrace.providermodule is deprecated and will be removed in v3.0.0. - Deprecates the following constants in
ddtrace.constantsmodule:ANALYTICS_SAMPLE_RATE_KEYSAMPLE_RATE_METRIC_KEYSAMPLING_PRIORITY_KEYSAMPLING_AGENT_DECISIONSAMPLING_RULE_DECISIONSAMPLING_LIMIT_DECISIONORIGIN_KEYUSER_ID_KEYHOSTNAME_KEYRUNTIME_FAMILYBASE_SERVICE_KEYSPAN_MEASURED_KEYKEEP_SPANS_RATE_KEYMULTIPLE_IP_HEADERSCONFIG_ENDPOINT_ENVCONFIG_ENDPOINT_RETRIES_ENVCONFIG_ENDPOINT_TIMEOUT_ENV
- Internalizes the
ddtrace.settings.configmodule and deprecates the followingddtrace.configattributes:http, useDD_TRACE_HEADER_TAGSenvironment variable instead.http_server, useDD_TRACE_HTTP_SERVER_ERROR_STATUSESenvironment variable instead.trace_headers, this attribute is internal to the tracer.header_is_traced, this attribute is internal to the tracer.convert_rc_trace_sampling_rules, this attribute is internal to the tracer.enable_remote_configuration, useDD_REMOTE_CONFIGURATION_ENABLEDenvironment variable instead.get_from, useddtrace.trace.Pinto set instance level configurations.
- Removes deprecated attributes from
ddtrace.config.
- Moves
New Features
-
Removes code and tests related to Python 3.7, breaking the library's compatibility with this Python version.
-
ASM
- Introduces use of meta struct for appsec event reports. This will improve performances. ASM will now require at least agent version 7.35.0 to work as expected.
-
Code Security (IAST)
- Introduces Code Security support to PyMySQL and MySQLDB integrations.
- XSS detection for Django applications, which will be displayed on your DataDog Vulnerability Explorer dashboard. See the Application Vulnerability Management documentation for more information about this feature.
- Implements the detection of the Stacktrace-Leak vulnerability for Django, Flask and FastAPI.
-
LLM Observability
- openai: Introduces tracing support to the OpenAI integration for Python versions 3.12 and 3.13.
- Introduces an integration with the RAGAS evaluation framework to continuously monitor
the performance of context-augmented LLM generations in production.
The integration supports evaluating LLM inferences with the following RAGAS metrics:- Faithfulness: measures if the LLM response is faithful to the provided context.
- Answer Relevancy: measures how relevant the LLM response is to the user input.
- Context Precision: measures how effectively the context is used in the generated response.
To learn more, see the LLM Observability evaluations guide.
Bug Fixes
-
ASM
- Resolves an issue where IAST modules could be loaded, even if disabled, which could create an ImportError exception on Windows.
-
CI Visibility
- Fixes an issue where Auto Test Retries with pytest would always consider retries of tests defined inside unittest classes to be successful.
-
Code security (IAST)
- Resolves an issue where the usage of callonce decorator could trigger an import loop
-
LLM Observability
- Resolves an issue where successive calls to
LLMObs.annotate()on the same span caused overwriting of metrics, metadata, and prompt dictionaries. Now, callingLLMObs.annotate()will merge new metrics/metadata/prompt values with any existing ones. - Resolves an issue where spans were being enqueued to an inactive evaluator runner which caused noisy logs related to the evaluator runner buffer being full.
- Resolves an issue where explicitly only using
LLMObs.enable()to configure LLM Observability without environment variables would not automatically propagate distributed tracing headers. - Resolves an issue where annotating a span with non latin-1 (but valid utf-8) input/output values resulted in encoding errors.
- Resolves an issue where extracting token metadata from openai streamed chat completion token chunks caused an IndexError.
openai: Fixes a patching issue where asynchronous moderation endpoint calls resulted in coroutine scheduling errors.vertexai: Resolves an issue withchat.send_message()where the content keyword argument was not parsed correctly.
- Resolves an issue where successive calls to
-
Profiling
- Fixes an issue on arm64 macOS where the profiler was not able to find native extension modules to enable the following features:
DD_PROFILING_TIMELINE_ENABLEDandDD_PROFILING_STACK_V2_ENABLED. - Fixes SystemError from the memory profiler returning NULL when collecting events
- Fixes an issue on arm64 macOS where the profiler was not able to find native extension modules to enable the following features:
Other Changes
- Tracing
- Ensures the ddtrace library does not use deprecated APIs internally. Deprecation warnings should only be logged when the user's code is using deprecated APIs.
cassandra,cherrypy,flask_cache,starlette: Ensures a deprecation warning is not raised when patching these integrations viaddtrace-runandimport ddtrace.auto.- Removes the deprecated tracing modules and constants from the
ddtracepackage.