pypi ddtrace 3.13.0rc1

4 days ago

Estimated end-of-life date, accurate to within three months: 08-2026
See the support level definitions for more information.

Deprecation Notes

  • 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.

New Features

  • opentelemetry

    • Adds experimental support for exporting logs using the OTLP protocol. To enable this feature install the opentelemetry-otlp-exporter and set DD_LOGS_OTEL_ENABLED=true.
    • 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.
    • Adds support for collecting tool definitions, tool calls and tool results in the Google GenAI integration.
    • This 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 to ol_calls and tool_results fields for function calling scenarios.
    • Adds support for collecting tool definitions, tool calls and tool results in the OpenAI integration.
    • 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).

    When enabled, the Django integration always generates a database span for every operation, even if the underlying database engine is already instrumented. This ensures complete coverage but may produce duplicat
    e spans and extra overhead.

    When disabled, spans are only created if the database engine is not instrumented.

    To avoid multiple spans per database call, we recommend disabling this option. DD_DJANGO_ALWAYS_CREATE_DATABASE_SPANS=false

  • AAP

    • This introduces endpoint discovery for Flask applications. It allows the collection of API endpoints of a Flask application at startup.
    • This introduces endpoint discovery for FastAPI applications. It allows the collection of API endpoints of a FastAPI application at startup.
  • 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: This fix resolves 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: This fix resolves a potential circular import with the psycopg3 contrib.

  • internal: This fix resolves 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.
    • Fixes duration of websocket handshake span such that the handshake span closes when the connection is upgraded.
    • Fix where websocket.close parent should be the handshake span when configuration is disabled.
    • 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. Note that single span sampling is only used to
      override trace sampling decisions to keep a span where the trace will be dropped.
    • Removed automatic setting of local trace sampling rule tag (_dd.p.dm=-3) during distributed tracing header extraction.
  • ssi, crashtracker: This fix resolves an issue where crashtracker receiver binary was not available in an injected environment.

Other Changes

  • LLM Observability: add ability to override the URL origin.
  • openai: Removes I/O tags, including llm prompts, parameters, and token usage, from APM spans for OpenAI audio, image, and moderation requests.

Don't miss a new ddtrace release

NewReleases is sending notifications on new releases.