v4.8.0rc5
Breaking Changes📦 datadog-sdkView on GitHub →
⚠ 2 breaking✨ 12 features🐛 11 fixes⚡ 1 deprecations🔧 14 symbols
Summary
This release introduces significant features for AI Observability (LLM Observability, AI Guard enhancements) and CI Visibility (Bazel offline support), alongside critical bug fixes and breaking changes to claude_agent_sdk span naming.
⚠️ Breaking Changes
- Tool span resource names for claude_agent_sdk have changed from the tool name (e.g. `Read`, `Bash`) to `claude_agent_sdk.tool`. Users relying on the old resource name format must update their expectations to include `.tool` followed by the specific tool name (e.g., `claude_agent_sdk.tool.Read`).
- RQ integration compatibility: Replaced usage of the removed `Job.get_id()` with the `job.id` property in the RQ integration. Also, handling for `Job.get_status()` has changed; it now raises `InvalidJobOperation` for expired jobs instead of returning `None`.
Migration Steps
- Update code relying on `claude_agent_sdk` tool span resource names to expect the format `claude_agent_sdk.tool.<tool_name>` instead of just `<tool_name>`.
- If using RQ integration, update code to use `job.id` instead of `Job.get_id()`.
- If using RQ integration, handle potential `InvalidJobOperation` exceptions when calling status checks on expired jobs.
✨ New Features
- AI Guard now respects the `DD_AI_GUARD_BLOCK` environment variable (defaults to True) to control blocking behavior based on UI settings. Setting it to False forces monitor-only mode.
- AI Guard response objects now include a `tag_probs` dictionary field containing probabilities for each tag.
- CI Visibility adds Bazel offline execution support via manifest mode (`DD_TEST_OPTIMIZATION_MANIFEST_FILE`) and payload-files mode (`DD_TEST_OPTIMIZATION_PAYLOADS_IN_FILES`).
- LLM Observability captures individual LLM spans for each Claude model turn in a Claude Agent SDK session, including input/output messages, model name, and token usage (if claude_agent_sdk >= 0.1.49).
- Application Security Protection (AAP) now supports FastAPI and Starlette applications using `app.mount()`, correctly handling WAF evaluation, path extraction, and `http.route` reporting across mounted sub-applications.
- Tracing added for Google Cloud Pub/Sub admin operations (topic, subscription, snapshot, schema management).
- Google Cloud Pub/Sub push subscriptions now generate an inferred `gcp.pubsub.receive` span upon message delivery via HTTP. Control propagation via `DD_GOOGLE_CLOUD_PUBSUB_PROPAGATION_AS_SPAN_LINKS`.
- LLM Observability adds `ExperimentRun.as_dataframe()` to convert experiment run results into a pandas DataFrame, requiring `pandas` installation.
- LLM Observability adds an `eval_scope` parameter to `LLMObs.submit_evaluation()` to associate evaluations with the entire trace (`"trace"`) or just the current span (`"span"`).
- LLM Observability adds `LLMObs.get_spans()` to retrieve span events from the Datadog platform API, supporting various filters and auto-pagination.
- Profiling generated from fork-based servers now includes a `process_type` tag (`main` or `worker`).
- Tracing support added for including the class name in the default span name for `@tracer.wrap` when enabled via configuration.
🐛 Bug Fixes
- Fixed CI visibility issue where CI provider metadata could omit pull request base branch/head commit details or report incorrect PR values for some providers.
- Fixed internal telemetry reporting where AAP was incorrectly reported as enabled by default for all services upon remote configuration listener registration.
- Fixed missing `network.client.ip` and `http.client_ip` span tags for FastAPI in the ASGI integration.
- Fixed a crash in the IAST integration.
- Fixed a spurious `Unable to create shared memory` warning on every AWS Lambda cold start.
- Fixed LLM Observability state management when APM_TRACING remote configuration payload omits the `llmobs` section, ensuring programmatic enablement via `LLMObs.enable()` is preserved.
- Fixed a circular import in `ddtrace.llmobs._writer` when `anthropic`, `openai`, and `botocore` are installed.
- Prevented potential crashes when the client library fails to restart a worker thread due to hitting system resource limits.
- Fixed an issue in `ddtrace.internal.process_tags` where reading unknown attributes caused a `KeyError` instead of raising an `AttributeError`.
- Fixed Tornado routing issue where routes in nested applications were matched in reverse declaration order, potentially causing catch-all patterns to override more specific routes.
- Fixed population of the `http.route` tag for Tornado routes whose regex patterns contain non-capturing groups (e.g., `(?:a|b)`).
Affected Symbols
⚡ Deprecations
- Support for making the default span name for `@tracer.wrap` include the class name is currently opt-in via `DD_TRACE_WRAP_SPAN_NAME_INCLUDE_CLASS=true`. This behavior will become the default in the next major release.