v4.9.0
Breaking Changes📦 datadog-sdkView on GitHub →
⚠ 1 breaking✨ 14 features🐛 8 fixes⚡ 1 deprecations🔧 7 symbols
Summary
This release introduces significant enhancements for LLM Observability, AI Guard integration, and CI Visibility, alongside fixing several critical bugs related to coverage and tracing instrumentation. A breaking change affects how HTTP status codes are reported for Azure CosmosDB spans.
⚠️ Breaking Changes
- Azure CosmosDB spans no longer include the `http.status_code` tag; it has been replaced by the `db.response.status_code` metric. Users relying on `http.status_code` on `cosmosdb.query` spans from v4.8.0 must update their queries to use `db.response.status_code`.
Migration Steps
- If you were relying on the `http.status_code` tag on Azure CosmosDB spans, update your queries to use the `db.response.status_code` metric instead.
- Replace usage of the deprecated environment variable `DD_TRACE_INFERRED_SPANS_ENABLED` with `DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED`.
✨ New Features
- Added tracing support for the `aws-durable-execution-sdk-python` library, instrumenting workflows and DurableContext operations.
- LLM Observability now adds `step` spans to the Claude Agent SDK integration, containing `llm` and `tool` child spans.
- Introduced a centralized `supported-configurations.json` registry for all supported `DD_*` and `OTEL_*` environment variables; unregistered variables now log a debug message.
- AI Guard now copies anomaly-detection attributes (`ai_guard.http.useragent`, `ai_guard.http.client_ip`, etc.) from the local root span onto every `ai_guard` span.
- When `DD_AI_GUARD_ENABLED=true`, the tracer now populates `http.client_ip` and `network.client.ip` on the service-entry span if an `ai_guard` span is created.
- Added AI Guard evaluation support to the OpenAI SDK chat completions instrumentation for both streaming and non-streaming requests.
- The code origin for spans feature is now enabled by default.
- Code origin information is now attached to the first span generated by a function wrapped with `tracer.wrap`.
- Introduced a configurable initialization timeout (default 10s) for `DataDogProvider` in OpenFeature via `DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS` or `init_timeout`.
- CI Visibility adds Jenkins custom parent ID propagation to correlate tests with Jenkins jobs/pipelines.
- LLM Observability adds an optional `cost_tags` argument to `LLMObs.annotate()` and `LLMObs.annotation_context()` to attach existing tags to cost/token metrics.
- LLM Observability adds support for an optional `version` field on tool definitions passed via the `tool_definitions` parameter to `LLMObs.annotate()`.
- Profiling now supports `DD_PROFILING_LOCK_EXCLUDE_MODULES` to skip lock profiling for specified framework-internal locks.
- LLM Observability emits Bedrock Agent orchestration step events (model invocations, tool calls, etc.) as APM child spans under the `Bedrock Agent <agent_id>` span.
🐛 Bug Fixes
- Excluded `wrapt==2.2.0` from the supported dependency range to resolve a regression breaking wrapped C descriptors.
- Resolved a conflict between `ddtrace.auto` and `strands` imports that silently disabled Strands hooks; Strands integration now loads lazily.
- Added telemetry metrics `instrum.user_auth.missing_user_login` and `instrum.user_auth.missing_user_id` when Django auth events fail to resolve identity fields.
- Fixed missing `usr.session_id` tag on the entry span of authenticated follow-up Django requests when automatic user instrumentation is enabled.
- Fixed a pytest plugin issue where malformed log calls emitted `--- Logging error ---` tracebacks to stderr during Attempt to Fix retries, polluting output.
- Fixed an `IndexError` in CI Visibility retry bookkeeping during failed test teardown, which caused `--- Logging error ---` tracebacks in stderr.
- Fixed a regression in CI Visibility where setting `DD_TEST_MANAGEMENT_ENABLED=0` was ignored, keeping Test Management features active.
- Fixed code coverage instrumentation on Python 3.13, 3.14, and 3.15, resolving lost per-test line data and stale data issues across context boundaries and Python versions.
Affected Symbols
⚡ Deprecations
- `DD_TRACE_INFERRED_SPANS_ENABLED` is deprecated and will be removed in 5.0.0. Users should switch to using `DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED` instead.