Change8

v3.9.0

📦 datadog-sdkView on GitHub →
12 features🐛 14 fixes3 deprecations🔧 5 symbols

Summary

This release introduces significant new features across DSM, Azure Functions, Code Security (IAST), CI Visibility, AAP, LiteLLM, and LLM Observability, alongside numerous bug fixes for tracing stability and LLM integrations. Support for DD_TRACE_GLOBAL_TAGS and legacy App Analytics has been deprecated/removed.

Migration Steps

  1. If you were using DD_TRACE_GLOBAL_TAGS, update your configuration to use DD_TAGS instead.
  2. If you were starting the serverless mini agent from the tracer, migrate to using the datadog-serverless-compat package.

✨ New Features

  • Added support for context extraction for SQS -> Lambda message events (DSM).
  • Added support for Python 3.13 on Windows.
  • Added distributed tracing support for http triggers in azure_functions.
  • Unvalidated Redirect detection for Django, Flask and FastAPI applications via Code Security (IAST), displayed on DataDog Vulnerability Explorer dashboard.
  • CI Visibility pytest plugin now includes report links to Datadog Test Optimization pages at the end of a test session.
  • AAP now supports the WAF deciding the sampling priority of the trace in case of a security event.
  • Added APM and LLM Observability tracing support for LiteLLM's synchronous and asynchronous completion and text_completion router methods.
  • LLM Observability: Added processor capability to process span inputs and outputs.
  • LLM Observability: Propagates the ml_app of the most recent LLM Observability span (or global ml_app) when injecting distributed headers, using distributed trace headers in distributed services.
  • LLM Observability: Introduced tracing for system prompts in the OpenAI Agents SDK.
  • LLM Observability: Introduced tracing for the content of tool call outputs passed to LLM spans for the OpenAI Agents integration.
  • Dynamic instrumentation now supports excluding identifiers from redaction via DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS.

🐛 Bug Fixes

  • LLM Observability: Resolved an issue where error type was set to the full error message for OpenAI Agents SDK errors, causing long error types.
  • LLM Observability: Fixed tracing failure for LLM interactions when a non-default base URL was used for Anthropic, Bedrock, LangChain, Open AI, and Azure Open AI integrations.
  • LLM Observability: Resolved an attribute error caused by parsing token usage from langchain AI message types.
  • LLM Observability: Fixed a KeyError raised when using astream_events on a compiled graph.
  • CI Visibility: Resolved an issue where DD_CIVISIBILITY_ITR_ENABLED was not honored correctly.
  • CI Visibility: Fixed an issue where running from a GitHub action triggered on a tag push resulted in a null branch name, causing errors when fetching Test Optimization settings.
  • crewai: Fixed a TypeError thrown when using crewai>=1.120.0 with ddtrace due to empty task contexts.
  • tracing: Fixed a regression in distributed tracing where pickling ddtrace.trace.Context failed in coroutines (introduced in v3.7.0).
  • tracing: Fixed issue where Trace Agent sampling rates were not applied when using a TraceFilter and tracer.configure.
  • tracing: Resolved the "sample_before_fork was unregistered without first being registered" warning by ensuring tracer at_exit hooks are registered/unregistered exactly once.
  • tracing: Fixed inconsistent counting of UTF-8 multibyte characters during span attribute truncation (>25000 chars), preventing unicode string too large errors.
  • openai: Resolved an issue where streamed completions and chat completions immediately returning None resulted in unfinished spans.
  • dynamic instrumentation: Fixed an issue where only module scopes were uploaded, preventing method probes from being created.
  • langgraph: Fixed missing spans when using astream_events on a compiled graph.

🔧 Affected Symbols

ddtrace.trace.ContextTraceFiltercompletiontext_completionastream_events

⚡ Deprecations

  • Support for DD_TRACE_GLOBAL_TAGS is deprecated in favor of DD_TAGS.
  • Support for APM Legacy App Analytics is removed (remnants exist but are non-functional and issue warnings).
  • Starting the serverless mini agent from the tracer is deprecated; use the datadog-serverless-compat package instead.