●Change8

v3.12.0rc1

πŸ“¦ datadog-sdkView on GitHub β†’
✨ 7 featuresπŸ› 18 fixes⚑ 4 deprecationsπŸ”§ 9 symbols

Summary

This release introduces the technical preview of the AI Guard Python SDK, enhances LLM Observability with increased limits and LangGraph support, and fixes numerous bugs across tracing, CI Visibility, and integrations. Windows profiling support has been removed.

Migration Steps

  1. If you were using `DD_PROFILING_TIMELINE_ENABLED=False`, note that timeline view is now enabled by default. If you need to disable it, set `DD_PROFILING_TIMELINE_ENABLED=False`.
  2. Update calls to `HTTPPropagator.inject` to use the `context` keyword argument instead of the positional `non_active_span` argument.
  3. If using Windows for profiling, you must migrate to a different OS as support has been removed.
  4. If you were relying on `DD_PROFILING_MAX_EVENTS`, replace it with `DD_PROFILING_HEAP_SAMPLE_SIZE` to control memory profiler sampling frequency.
  5. If you need to disable distributed tracing for MCP tool calls, set `DD_MCP_DISTRIBUTED_TRACING=False` on both client and server.
  6. If you were using the old websocket tracing environment variable, switch to `DD_TRACE_WEBSOCKET_MESSAGES_ENABLED`.

✨ 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 where the `CIVisibility` tracer is kept separate from the global `ddtrace` tracer (Experimental, enabled via `DD_CIVISIBILITY_USE_BETA_WRITER=true`).
  • LLM Observability: Increases span event size limit from 1MB to 5MB.
  • LLM Observability: Records agent manifest information for LangGraph compiled graphs.
  • LLM Observability: Add 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`).

πŸ› 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: Resolves an issue where the `route` parameter was not being correctly handled in the Django path function.
  • CI Visibility: Fixes 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 using `flaky` or `pytest-rerunfailures`.
  • 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`.
  • ASM: Fixes an issue where a malformed package would prevent reporting of other correctly formed packages to Software Composition Analysis.
  • openai: Resolves an issue where an uninitialized `OpenAI/AsyncOpenAI` client would result in an `AttributeError`.
  • pydantic_ai: Fixes 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: Fixes an issue where the `list_topics` call in the Kafka integration could hang indefinitely by adding a timeout and caching results.
  • 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.injectCIVisibilityddtraceOpenAI/AsyncOpenAIpydantic-ai-slimlanggraphgoogle-genaiopenai

⚑ 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` instead.