v3.13.0
📦 datadog-sdkView on GitHub →
✨ 11 features🐛 13 fixes⚡ 1 deprecations🔧 13 symbols
Summary
This release introduces significant new features for LLM Observability across multiple integrations (Bedrock, GenAI, OpenAI, VertexAI) and adds experimental OTLP log exporting support via OpenTelemetry. It also includes several bug fixes, notably around websocket span closing and sampling rules, and deprecates ddtrace.tracer.Pin.
Migration Steps
- For Django users, to avoid multiple spans per database call, it is recommended to disable DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS by setting DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS=false.
- If using OpenTelemetry log exporting, install the opentelemetry-otlp-exporter package and set the environment variable DD_LOGS_OTEL_ENABLED=true.
✨ New Features
- opentelemetry: Adds experimental support for exporting logs using the OTLP protocol. Install the opentelemetry-otlp-exporter and set DD_LOGS_OTEL_ENABLED=true.
- opentelemetry: Ensures that ddtrace log injection is disabled when OpenTelemetry logs are enabled (DD_LOGS_OTEL_ENABLED=true).
- LLM Observability: Adds support for collecting tool definitions, tool calls and tool results in the Amazon Bedrock integration.
- LLM Observability: Adds support for collecting tool definitions, tool calls and tool results in the Google GenAI integration.
- LLM Observability: Introduces support for tool calls and tool results in LLMObs message annotations when using custom instrumentation. The LLMObs.annotate() method now accept input and output data with optional tool_calls and tool_results fields for function calling scenarios.
- LLM Observability: Adds support for collecting tool definitions, tool calls and tool results in the OpenAI integration.
- LLM Observability: Adds 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), which controls whether the Django integration always generates a database span for every operation.
- AAP: Introduces endpoint discovery for Flask applications, allowing the collection of API endpoints at startup.
- AAP: Introduces endpoint discovery for FastAPI applications, allowing the collection of API endpoints at startup.
- LLM Observability: Add ability to override the URL origin.
🐛 Bug Fixes
- AAP: Fixes an issue where security signals would be incorrectly reported on an inferred proxy service instead of the current service.
- CI Visibility: Fixes an issue where the pytest plugin would hold a reference to test exceptions beyond the end of the test, preventing them from being garbage-collected and increasing memory usage.
- psycopg: Fixes a potential circular import with the psycopg3 contrib.
- internal: Fixes 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: Fixes issue with websocket.receive span not closing exactly when another websocket.receive span was opened.
- tracing: Fixes duration of websocket handshake span such that the handshake span closes when the connection is upgraded.
- tracing: Fix where websocket.close parent should be the handshake span when configuration is disabled.
- tracing: Resolves an issue where calling ddtrace.trace.tracer.configure(...) resets 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 (e.g., inside complex CASE expressions).
- LLM Observability: Properly parse DD_TAGS onto LLM Observability span events' tags.
- sampling: Fixed a bug where single span sampling rules were completely ignored when stats computation was enabled, causing all single-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: Fixes an issue where crashtracker receiver binary was not available in an injected environment.
🔧 Affected Symbols
ddtrace.tracer.PinLLMObs.annotateDD_DJANGO_ALWAYS_CREATE_DATABASE_SPANSpytestpsycopg3DD_TRACE_AGENT_URLwebsocket.receivewebsocket.closeddtrace.trace.tracer.configureSQLAlchemyDD_TAGS_dd.p.dmcrashtracker⚡ Deprecations
- tracing: ddtrace.tracer.Pin is deprecated and will be removed in version 4.0.0. To manage configuration of the tracer or integrations please use environment variables.