2.21.0
New Features
- LLM Observability
openai: Introduces tracing support to the OpenAI integration for Python versions 3.12 and 3.13.
Deprecation Notes
- 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.
- Moves
Bug Fixes
-
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
- Resolves an issue where the usage of
calloncedecorator could trigger an import loop
- Resolves an issue where the usage of
-
LLM Observability
- 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 explicitly only using
-
Profiling
- Fixes
SystemErrorfrom the memory profiler returning NULL when collecting events
- Fixes
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.