github DataDog/dd-trace-py v3.5.0
3.5.0

latest releases: v2.21.6, v3.4.2, v3.5.1...
one day ago

Deprecation Notes

  • Tracing
    • opentracing: Support for OpenTracing has been deprecated and will be removed in v4.0.0. Please use the OpenTelemetry API instead.
    • DD_RUNTIME_METRICS_INTERVAL is deprecated and will be removed in the 4.0.0 release.

New Features

  • LLM Observability

    • Introduces tracing for converse_stream calls to the Bedrock Converse API. converse_stream calls are traced as LLM spans with max_tokens, temperature inference parameters and input/output messages.
    • Introduces tracing support for LangGraph graph and node invocation.
    • Introduces tracing support for CrewAI crew, task, agent, and tool executions.
    • Introduces tracing support for OpenAI Agents SDK. Agent, guardrail, tool, handoff, response, and custom operations are traced. Input/output data for the trace is only set if the default Responses API is used.
    • botocore: Introduces capturing prompts, token usage, and inference parameters for converse_stream calls to the Bedrock API.
    • crewai: Introduces tracing support for the CrewAI SDK, specifically tracing crew, task, agent, and tool executions. See the docs for more information.
    • litellm: Introduces tracing support for the LiteLLM Python SDK's synchronous and asynchronous completion and text_completion methods. See the docs for more information.
    • openai_agents: Introduces tracing support for OpenAI Agents SDK. Agent, guardrail, tool, handoff, response, and custom operations are traced. See the docs for more information.
  • Tracing

    • Support for Database Monitoring (DBM) propagation in pymongo. Two propagation modes are supported:

      • Full mode: Injects both service information and trace context, allowing complete correlation between traces and database monitoring samples.
      • Service mode: Injects only service information, enabling service-level correlation without trace-specific details.

      This feature can be controlled using the DD_DBM_PROPAGATION_MODE environment variable with values full, service, or disabled. Example of enabling full or service propagation mode: DD_DBM_PROPAGATION_MODE=full|service
      Note that this feature requires PyMongo 3.9 or higher.

    • A subset of the tracer configuration is now stored on disk throughout the tracer's lifetime. This enables the monitoring of which processes are instrumented.

    • azure_functions: Introduces tracing support for timer triggers.

    • langgraph: Introduces tracing support for LangGraph, specifically tracing graph and node executions. See the docs for more information.

Bug Fixes

  • Code Security

    • IAST: Fixes a bug where invalid f-strings didn’t raise the expected "Unknown format code" error when IAST was enabled.
    • Fixes an issue with PosixPath handling in path operations that could cause errors during taint tracking. This fix improves stability and slightly reduces import times.
  • CI Visibility

    • Resolves an issue where the CODEOWNERS file of the project being tested was looked up in the current working directory rather than the repository root.
    • Resolves an issue where an I/O operation on closed file error was raised while printing ddtrace logs during a pytest session, due to a conflict with pytest's log capture.
  • Profiling

    • Fixes an infinite recursion from calling logging module when lock profiler fails to delete _self_acquired_at attribute.
  • Tracing

    • Resolves an issue where Django, Flask, Cherrypy, wsgi, asgi, pyramid, molten, falcon, tornado, aiohttp, bottle, rq, and sanic integrations were unnecessarily running code to activate distributed tracing headers multiple times per request. This is fixed by only activating distributed tracing headers once per request.
    • azure_functions: Resolves an issue where the function name set by the function_name decorator was ignored.
    • azure_functions: Resolves an issue where a function would not start if the trigger_arg_nameparameter was set to anything other than req.
    • azure_functions: Resolves an issue where timer triggers had a span kind of server instead of internal
    • graphql: Resolves AttributeError raised when used with older versions of graphql-core that do not have formatted property for SourceLocation.
    • opentelemetry: Updates trace flags in opentelemetry.trace.Span.get_span_context() to match OpenTelemetry specification.
    • subprocess: Removes unnecessary debug log variables.

Don't miss a new dd-trace-py release

NewReleases is sending notifications on new releases.