v4.8.0rc4
📦 datadog-sdkView on GitHub →
✨ 10 features🐛 15 fixes⚡ 2 deprecations🔧 11 symbols
Summary
This release introduces significant new features across profiling, tracing (Azure CosmosDB, MySQL async, OTLP export), and LLM Observability (LlamaIndex support, Remote Config). It also removes support for the RAGAS integration and deprecates several configuration parameters.
Migration Steps
- If using RAGAS evaluations, manually submit these evaluation results as support for the RAGAS integration is removed.
- To manage DB tracing configuration, use integration configuration and environment variables instead of the deprecated `pin` parameter.
- Replace the deprecated environment variable `DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED` with `DD_TRACE_INFERRED_SPANS_ENABLED`.
- For agentless CI Visibility setups, set `DD_AGENTLESS_LOG_SUBMISSION_ENABLED=true`.
- When using the Datadog Agent for CI Visibility, set `DD_LOGS_INJECTION=true`.
- If using OTLP HTTP/JSON export, set `OTEL_TRACES_EXPORTER=otlp`.
- To enable eager flushing for pytest-xdist worker crash resilience, set `DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=1`.
✨ New Features
- Profiling now supports thread sub-sampling to reduce CPU overhead by limiting the number of threads captured per sampling interval.
- Adds a LiteLLM proxy guardrail integration (`ddtrace.appsec.ai_guard.integrations.litellm.DatadogAIGuardGuardrail`) for Datadog AI Guard evaluation in the LiteLLM proxy (requires `litellm>=1.46.1`).
- Adds tracing support for Azure CosmosDB, tracing CRUD operations on databases, containers, and items.
- CI Visibility adds automatic log correlation and submission for test logs alongside test runs. Enable via `DD_AGENTLESS_LOG_SUBMISSION_ENABLED=true` or `DD_LOGS_INJECTION=true`.
- Adds APM tracing and LLM Observability support for `llama-index-core>=0.11.0`, tracing LLM calls, query engines, retrievers, embeddings, and agents.
- Adds support for exporting traces in OTLP HTTP/JSON format via libdatadog by setting `OTEL_TRACES_EXPORTER=otlp`.
- Introduces tracing support for `mysql.connector.aio.connect` in the MySQL integration.
- Adds support for enabling and disabling LLMObs via Remote Configuration.
- Introduces a `decorator` tag to LLM Observability spans traced by a function decorator.
- LLM Observability experiments now accept a pydantic_evals `ReportEvaluator` returning exactly `ScalarResult` as a summary evaluator, recording the scalar value.
🐛 Bug Fixes
- Fixes lock profiling samples not appearing in the Thread Timeline view for macOS events.
- Fixes a rare crash occurring post-fork in fork-based applications.
- Fixes a bug in Lock Profiling that caused crashes when accessing attributes of custom Lock subclasses (e.g., in Ray).
- Fixes a rare crash occurring when profiling asyncio code with many tasks or deep call stacks.
- Fixes a potential internal thread leak in fork-heavy applications.
- Resolves an issue where a `ModuleNotFoundError` could be raised at startup in Python environments lacking the `_ctypes` extension module.
- Fixes a crash that could occur post-fork in fork-heavy applications.
- Fixes incorrect span hierarchy in LLMObs traces when using ddtrace SDK alongside OTel instrumentation (e.g., Strands Agents), ensuring OTel gen_ai spans are nested correctly.
- Fixes multimodal OpenAI chat completion inputs being rendered as raw iterable objects; content parts are now materialized and formatted as readable text.
- Fixes `model_name` and `model_provider` reporting incorrect values on AWS Bedrock LLM spans to match backend pricing data.
- Fixes an issue where deferred tools (`defer_loading=True`) in Anthropic/OpenAI integrations caused LLMObs span payloads to include full tool descriptions/schemas; deferred definitions now only preserve the tool name.
- Fixes an issue where deeply nested tool schemas in Anthropic and OpenAI integrations were unsupported; schemas exceeding max depth are now truncated.
- Resolves issue where pytest-xdist worker crashes caused buffered test events to be lost (enable eager flushing via `DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=1`).
- Resolves issue where a failure response from `/search_commits` caused git metadata upload to fall back to sending full 30-day history; upload now aborts on `/search_commits` failure.
- Fixes a thread-safety issue in the IAST taint tracking context.
Affected Symbols
ray.job.submitray.job.submit_statusddtrace.contrib.dbapi.TracedConnectionddtrace.contrib.dbapi.TracedCursorddtrace.contrib.dbapi_async.TracedAsyncConnectionddtrace.appsec.ai_guard.integrations.litellm.DatadogAIGuardGuardrailllama-index-coremysql.connector.aio.connectddtrace.llmobs.LLMObspydantic_evals.evaluators.ReportEvaluatorpydantic_evals.reporting.analyses.ScalarResult
⚡ Deprecations
- The `pin` parameter in `ddtrace.contrib.dbapi.TracedConnection`, `ddtrace.contrib.dbapi.TracedCursor`, and `ddtrace.contrib.dbapi_async.TracedAsyncConnection` is deprecated and will be removed in version 5.0.0. Manage configuration via integration configuration and environment variables instead.
- The environment variable `DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED` is deprecated and will be removed in 5.0.0. Use `DD_TRACE_INFERRED_SPANS_ENABLED` instead. The old variable still works but emits a `DDTraceDeprecationWarning`.