Change8

v4.8.0rc3

📦 datadog-sdkView on GitHub →
7 features🐛 13 fixes2 deprecations🔧 5 symbols

Summary

This release introduces new integrations for Azure CosmosDB, LiteLLM proxy guardrails, and LlamaIndex, alongside significant bug fixes for profiling, LLM Observability span hierarchy, and CI Visibility stability. Support for the RAGAS integration has been removed.

Migration Steps

  1. If using RAGAS integration, switch to manually submitting evaluation results via the external evaluation documentation.
  2. To enable eager flushing for CI Visibility pytest-xdist worker crash fixes, set `DD_TRACE_PARTIAL_FLUSH_MIN_SPANS=1`.
  3. For agentless CI Visibility log submission, set `DD_AGENTLESS_LOG_SUBMISSION_ENABLED=true`.
  4. When using Datadog Agent for CI Visibility log submission, set `DD_LOGS_INJECTION=true`.
  5. When using OTLP exporters, set `OTEL_TRACES_EXPORTER=otlp` to send spans to an OTLP endpoint.

✨ New Features

  • Adds a LiteLLM proxy guardrail integration (`ddtrace.appsec.ai_guard.integrations.litellm.DatadogAIGuardGuardrail`) for Datadog AI Guard, requiring `litellm>=1.46.1`.
  • Adds tracing support for Azure CosmosDB, covering CRUD operations on databases, containers, and items.
  • CI Visibility adds automatic log correlation and submission for test logs to appear 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 a `decorator` tag to LLM Observability spans traced by a function decorator.
  • LLM Observability experiments now accept a `pydantic_evals` `ReportEvaluator` as a summary evaluator if its `evaluate` return annotation is exactly `ScalarResult`, recording the scalar `value`.

🐛 Bug Fixes

  • Fixes lock profiling samples not appearing in the Thread Timeline view for macOS events.
  • Fixes a rare crash that could occur 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 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, ensuring OTel gen_ai spans are nested correctly under SDK parent spans.
  • Fixes multimodal OpenAI chat completion inputs being rendered as raw iterable objects; content parts are now properly materialized and formatted as text.
  • Fixes `model_name` and `model_provider` reporting on AWS Bedrock LLM spans to match backend pricing data by using the correct values derived from `model_id`.
  • Fixes an issue where deferred tools in Anthropic/OpenAI integrations caused LLMObs span payloads to include full tool descriptions/schemas; definitions are now stripped, preserving only the tool name.
  • Resolves an 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 an issue where a failure response from the `/search_commits` endpoint caused git metadata upload to fall back to sending full 30-day history; the upload now aborts on failure.
  • Resolves a thread-safety issue in the IAST taint tracking context that caused vulnerability detection to stop under high concurrency.

Affected Symbols

⚡ Deprecations

  • Support for the RAGAS integration in LLM Observability is removed. Users should manually submit RAGAS evaluation results using the external evaluation documentation.
  • 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. Configuration should now be managed via integration configuration and environment variables.