v3.12.0rc2
π¦ datadog-sdk
β¨ 9 featuresπ 18 fixesβ‘ 4 deprecationsπ§ 19 symbols
Summary
This release introduces the technical preview of the AI Guard Python SDK and adds significant features to LLM Observability and CI Visibility, while removing Windows support for profiling and deprecating older tracing initialization methods.
Migration Steps
- If you were using the deprecated `non_active_span` parameter in `HTTPPropagator.inject`, update calls to use `HTTPPropagator.inject(context=...)` instead.
- If you were relying on Windows support for profiling, note that it has been removed.
- If you were using the `DD_PROFILING_MAX_EVENTS` environment variable, replace it with `DD_PROFILING_HEAP_SAMPLE_SIZE` to control memory profiler sampling frequency.
β¨ New Features
- App and API Protection (AAP): Introduce a public Python SDK that provides programmatic access to AI Guardβs public endpoint (Technical Preview).
- asgi: Adds tracing on websocket spans with `DD_TRACE_WEBSOCKET_MESSAGES_ENABLED`, which replaces `DD_TRACE_WEBSOCKET_MESSAGES`.
- CI Visibility: Introduces an alternative method for collecting and sending test spans, keeping the `CIVisibility` tracer separate from the global `ddtrace` tracer (Experimental, enabled via `DD_CIVISIBILITY_USE_BETA_WRITER=true`).
- LLM Observability: Adds support for collecting tool definitions, tool calls and tool results in the Anthropic integration.
- LLM Observability: Increases span event size limit from 1MB to 5MB.
- LLM Observability: Records agent manifest information for LangGraph compiled graphs.
- LLM Observability: Adds ability to drop spans by having a `SpanProcessor` return `None`.
- LLM Observability (mcp): Adds distributed tracing support for MCP tool calls across client-server boundaries by default (can be disabled with `DD_MCP_DISTRIBUTED_TRACING=False`).
- profiling: timeline view is now enabled by default via `DD_PROFILING_TIMELINE_ENABLED=True`.
π Bug Fixes
- AAP: Resolves a bug where ASGI middleware would not catch the BlockingException raised by AAP because it was aggregated in an ExceptionGroup.
- AAP: This fix resolves an issue where a malformed package would prevent reporting of other correctly formed packages to Software Composition Analysis.
- AAP: This fix resolves an issue where the `route` parameter was not being correctly handled in the Django path function.
- CI Visibility: This fix resolves an issue where using the pytest `skipif` marker with the condition passed as a keyword argument (or not provided at all) would cause the test to be reported as failed, especially when `flaky` or `pytest-rerunfailures` were used.
- ddtrace_api: Fixes a bug in the ddtrace_api integration in which `patch()` with no arguments, and thus `patch_all()`, breaks the integration.
- django: fix incorrect component tag being set for django orm spans.
- dynamic instrumentation: extended captured value redaction in mappings with keys of type `bytes`.
- openai: Resolves an issue where an uninitialized `OpenAI/AsyncOpenAI` client would result in an `AttributeError`.
- pydantic_ai: This fix resolves an issue where enabling the Pydantic AI for `pydantic-ai-slim >= 0.4.4` would fail.
- tracing: Resolves an issue where sampling rules with null values for service, resource, or name would not match any spans; null and unset fields are now treated the same.
- tracing: Fix inconsistent trace sampling during partial flush (traces >300 spans) by correctly applying sampling rules to the root span.
- kafka: This fix resolves an issue where the `list_topics` call in the Kafka integration could hang indefinitely by setting a 1-second timeout and caching results/failures.
- Code Security (IAST): Fixes Gevent worker timeouts by preloading IAST early and refactoring taint sink initialization.
- LLM Observability: Fixes a bug where code execution outputs done through `google-genai` would result in no output messages on the LLM Observability `llm` span.
- LLM Observability: langgraph: resolves `ModuleNotFoundError` errors when patching `langgraph>=0.6.0`.
- LLM Observability: openai: fixed an issue when using the openai responses api with `openai>=1.66.0,<1.66.2` would result in an `AttributeError`.
- Remote Config: Eagerly query Remote Config upon process startup to ensure timely configuration updates.
- Flares: Fixes to make the tracer flares match the spec.
π§ Affected Symbols
ddtrace.settings.__init__HTTPPropagator.injectCIVisibilityddtraceAnthropic integrationLangGraphSpanProcessorMCP tool callsASGI middlewareDjango path functionddtrace_api.patchddtrace_api.patch_alldjango orm spansKafka integrationIASTgoogle-genailanggraphopenai responses apiRemote Configβ‘ Deprecations
- tracing: `ddtrace.settings.__init__` imports are deprecated and will be removed in version 4.0.0.
- tracing: Deprecate the non_active_span parameter in the `HTTPPropagator.inject` method. Use `HTTPPropagator.inject(context=...)` instead.
- profiling: Windows support is removed.
- profiling: ENV `DD_PROFILING_MAX_EVENTS` is deprecated and does nothing. Use `DD_PROFILING_HEAP_SAMPLE_SIZE` to control sampling frequency of the memory profiler.