●Change8

v3.12.0rc3

Breaking Changes
πŸ“¦ datadog-sdkView on GitHub β†’
⚠ 1 breaking✨ 10 featuresπŸ› 17 fixes⚑ 3 deprecationsπŸ”§ 26 symbols

Summary

This release introduces the technical preview of the AI Guard Python SDK, enhances LLM Observability tracing across several frameworks, and removes Windows support for profiling. Several bug fixes address issues in AAP, tracing sampling consistency, and various integrations like Kafka and OpenAI.

⚠️ Breaking Changes

  • profiling: Windows support is removed. If this change needs to be reverted, please file an issue.

Migration Steps

  1. If you rely on Windows profiling support, you must migrate to a different OS or file an issue requesting its reinstatement.
  2. Update tracing configuration to use `HTTPPropagator.inject(context=...)` instead of passing the `non_active_span` parameter.
  3. If using memory profiling, replace the deprecated environment variable `DD_PROFILING_MAX_EVENTS` with `DD_PROFILING_HEAP_SAMPLE_SIZE`.
  4. If enabling CI Visibility beta writer, set the environment variable `DD_CIVISIBILITY_USE_BETA_WRITER` to `true`.
  5. If distributed tracing for MCP tool calls needs to be disabled, set `DD_MCP_DISTRIBUTED_TRACING=False` on both client and server.
  6. If you were relying on the old behavior of sampling rules where null values were treated differently than unset values, be aware that null and unset fields are now treated the same.

✨ 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 when `DD_TRACE_WEBSOCKET_MESSAGES_ENABLED` is set (replaces `DD_TRACE_WEBSOCKET_MESSAGES`).
  • CI Visibility: Introduces an experimental alternative method for collecting and sending test spans where the `CIVisibility` tracer is separate from the global `ddtrace` tracer (enabled via `DD_CIVISIBILITY_USE_BETA_WRITER=true`).
  • crewai: Introduces APM and LLM Observability tracing support for CrewAI Flow `kickoff/kickoff_async` calls, including tracing internal flow method execution.
  • 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`.
  • mcp: Adds distributed tracing support for MCP tool calls across client-server boundaries by default (can be disabled with `DD_MCP_DISTRIBUTED_TRACING=False`).
  • Remote Config: Eagerly query Remote Config upon process startup to ensure timely configuration updates.

πŸ› 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). Now correctly applies sampling rules to the root span instead of a random payload 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 implementing failure caching.
  • 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`.
  • Flares: Fixes to make the tracer flares match the spec.

πŸ”§ Affected Symbols

ddtrace.settings.__init__HTTPPropagator.injectCIVisibilityDD_TRACE_WEBSOCKET_MESSAGES_ENABLEDDD_TRACE_WEBSOCKET_MESSAGEScrewai.Flow.kickoffcrewai.Flow.kickoff_asyncAnthropic integrationLangGraphMCP tool callsDD_MCP_DISTRIBUTED_TRACINGBlockingExceptionpytest.skipifddtrace_api.patchddtrace_api.patch_alldjango orm spansOpenAI clientAsyncOpenAI clientpydantic-ai-slimkafka.list_topicsgoogle-genailanggraphopenai responses apiDD_PROFILING_TIMELINE_ENABLEDDD_PROFILING_MAX_EVENTSDD_PROFILING_HEAP_SAMPLE_SIZE

⚑ Deprecations

  • `ddtrace.settings.__init__` imports are deprecated and will be removed in version 4.0.0.
  • The non_active_span parameter in the `HTTPPropagator.inject` method is deprecated. Use `HTTPPropagator.inject(context=...)` instead to inject headers.
  • ENV: `DD_PROFILING_MAX_EVENTS` is deprecated and does nothing. Use `DD_PROFILING_HEAP_SAMPLE_SIZE` to control sampling frequency of the memory profiler.