Change8

v3.13.0rc1

📦 datadog-sdkView on GitHub →
11 features🐛 13 fixes1 deprecations🔧 11 symbols

Summary

This release introduces significant LLM Observability enhancements for tool usage across multiple integrations (Bedrock, GenAI, OpenAI, VertexAI) and adds experimental OTLP log exporting support. It also deprecates `ddtrace.tracer.Pin` and includes numerous bug fixes across tracing, AAP, and sampling.

Migration Steps

  1. If you rely on `ddtrace.tracer.Pin`, migrate configuration management to use environment variables.
  2. If using Django and concerned about duplicate database spans, set `DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS=false`.
  3. If using OpenTelemetry logging, ensure you install `opentelemetry-otlp-exporter`.

✨ New Features

  • Experimental support for exporting logs using the OTLP protocol added to opentelemetry. Install `opentelemetry-otlp-exporter` and set `DD_LOGS_OTEL_ENABLED=true` to enable.
  • ddtrace log injection is disabled when OpenTelemetry logs are enabled (DD_LOGS_OTEL_ENABLED=true).
  • LLM Observability: Added support for collecting tool definitions, tool calls, and tool results in the Amazon Bedrock integration.
  • LLM Observability: Added support for collecting tool definitions, tool calls, and tool results in the Google GenAI integration.
  • LLMObs.annotate() now accepts input and output data with optional `tool_calls` and `tool_results` fields for function calling scenarios, supporting tool calls and tool results in LLMObs message annotations when using custom instrumentation.
  • LLM Observability: Added support for collecting tool definitions, tool calls, and tool results in the OpenAI integration.
  • LLM Observability: Added support for collecting tool definitions, tool calls, and tool results in the VertexAI integration.
  • Django: Added the `DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS` config option (default: `true`). Disabling it (`DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS=false`) is recommended to avoid duplicate spans.
  • AAP: Introduced endpoint discovery for Flask applications at startup.
  • AAP: Introduced endpoint discovery for FastAPI applications at startup.
  • LLM Observability: Added ability to override the URL origin.

🐛 Bug Fixes

  • AAP: Fixed an issue where security signals were incorrectly reported on an inferred proxy service instead of the current service.
  • CI Visibility: Resolved an issue where the `pytest` plugin held references to test exceptions beyond test completion, preventing garbage collection and increasing memory usage.
  • psycopg: Resolved a potential circular import with the psycopg3 contrib.
  • internal: Fixed an issue where the tracer flare was not sent when `DD_TRACE_AGENT_URL` was not set, as the default URL was not used.
  • tracing: Fixed issue where `websocket.receive` span was not closing exactly when another `websocket.receive` span was opened.
  • tracing: Fixed duration of websocket handshake span to close when the connection is upgraded.
  • tracing: Fixed case where `websocket.close` parent should be the handshake span when configuration is disabled.
  • tracing: Resolved an issue where calling `ddtrace.trace.tracer.configure(...)` reset the trace writer buffer, causing spans to be dropped.
  • Code Security: Fixed a crash in the taint-aware modulo aspect when formatting SQLAlchemy objects whose `__repr__` can raise.
  • LLM Observability: Properly parse `DD_TAGS` onto LLM Observability span events' tags.
  • sampling: Fixed a bug where single span sampling rules were ignored when stats computation was enabled, causing sampled spans to be dropped.
  • sampling: Removed automatic setting of local trace sampling rule tag (`_dd.p.dm=-3`) during distributed tracing header extraction.
  • ssi, crashtracker: Fixed an issue where the crashtracker receiver binary was unavailable in an injected environment.

🔧 Affected Symbols

ddtrace.tracer.PinLLMObs.annotateDD_DJANGO_ALWAYS_CREATE_DATABASE_SPANSpytest plugin (CI Visibility)psycopg3 contribddtrace.trace.tracer.configurewebsocket.receivewebsocket.closeSQLAlchemy objects (__repr__)DD_TAGS (LLM Observability)openai audio/image/moderation APM spans

⚡ Deprecations

  • ddtrace.tracer.Pin is deprecated and will be removed in version 4.0.0. Manage configuration of the tracer or integrations using environment variables instead.