github DataDog/dd-trace-py v2.10.0rc1
2.10.0rc1

latest releases: v2.16.0rc2, v2.14.5, v2.15.1...
pre-release4 months ago

Deprecation Notes

  • LLM Observability: DD_LLMOBS_APP_NAME is deprecated and will be removed in the next major version of ddtrace. As an alternative to DD_LLMOBS_APP_NAME, you can use DD_LLMOBS_ML_APP instead. See the SDK setup documentation for more details on how to configure the LLM Observability SDK.

New Features

  • LLM Observability: Adds support to automatically submit Anthropic chat messages to LLM Observability.

  • tracer: This introduces the tracer flare functionality. Currently the tracer flare includes the tracer logs and tracer configurations.

  • Expand SSRF vulnerability support for Code Security and Exploit Prevention for the modules urllib3, http.client, webbrowser and urllib.request.

  • ASM: This introduces full support for exploit prevention in the python tracer.

    • LFI (via standard API open)
    • SSRF (via standard API urllib or third party requests)

    with monitoring and blocking feature, telemetry and span metrics reports.

  • ASM: This introduces SQL injection support for exploit prevention.

  • anthropic: This introduces tracing support for anthropic chat messages.
    See the docs for more information.

  • ASM: This introduces "Standalone ASM", a feature that disables APM in the tracer but keeps ASM enabled. In order to enable it, set the environment variables DD_APPSEC_ENABLED=1 and DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED=1.

  • LLM Observability: This introduces the LLM Observability SDK, which enhances the observability of Python-based LLM applications. See the LLM Observability Overview or the SDK documentation for more information about this feature.

  • opentelemetry: Adds support for span events.

  • tracing: Ensures the following OpenTelemetry environment variables are mapped to an equivalent Datadog configuration (datadog environment variables taking precedence in cases where both are configured):

    OTEL_SERVICE_NAME -> DD_SERVICE
    OTEL_LOG_LEVEL -> DD_TRACE_DEBUG
    OTEL_PROPAGATORS -> DD_TRACE_PROPAGATION_STYLE
    OTEL_TRACES_SAMPLER -> DD_TRACE_SAMPLE_RATE
    OTEL_TRACES_EXPORTER -> DD_TRACE_ENABLED
    OTEL_METRICS_EXPORTER -> DD_RUNTIME_METRICS_ENABLED
    OTEL_LOGS_EXPORTER -> none
    OTEL_RESOURCE_ATTRIBUTES -> DD_TAGS
    OTEL_SDK_DISABLED -> DD_TRACE_OTEL_ENABLED
    
  • otel: adds support for generating Datadog trace metrics using OpenTelemetry instrumentations

Known Issues

  • Code Security: Security tracing for the builtins.open function is experimental and may not be stable. This aspect is not replaced by default.
  • grpc: Tracing for the grpc.aio clients and servers is experimental and may not be stable. This integration is now disabled by default.

Bug Fixes

  • ASM: This fix resolves an issue where an org could not customize actions through remote config.
  • ASM: protect against potentially returning None when tainting a gRPC message.
  • botocore: This fix adds additional key name checking and appropriate defaults for responses from Cohere and Amazon models.
  • This fix resolves an issue where importing asyncio after a trace has already been started will reset the currently active span.
  • fix(grpc): This fix a bug in the grpc.aio support specific to streaming responses.
  • openai: This fix resolves an issue where specifying n=None for streamed chat completions resulted in a TypeError.
  • openai: This fix removes patching for the edits and fine tunes endpoints, which have been removed from the OpenAI API.
  • openai: This fix resolves an issue where streamed OpenAI responses raised errors when being used as context managers.
  • tracing: Ensures span links generated by distributed tracing headers record the correct sampling decision.
  • telemetry: This fix resolves an issue when using pytest + gevent where the telemetry writer was eager initialized by pytest entrypoints loading of our plugin causing a potential dead lock.
  • tracing: Fixes an issue where DD_TRACE_SPAN_TRACEBACK_MAX_SIZE was not applied to exception tracebacks.
  • Code Security: This fixes a bug in the AST patching process where ImportError exceptions were being caught, interfering with the proper application cycle if an ImportError was expected."
  • Code Security: Ensure IAST propagation does not raise side effects related to Magic methods.
  • Code Security: fix a potential memory corruption when the context was reset.
  • langchain: This fix resolves an issue where specifying inputs as a keyword argument for batching on chains caused a crash.
  • Code Security: avoid calling terminate on the extend and join aspect when an exception is raised.
  • tracing: Ensures spans are rate limited at the expected rate (100 spans per second by default). Previously long running spans would set the rate limiter to set an invalid window and this could cause the next trace to be dropped.
  • RemoteConfig: This fix resolves an issue where remote config did not work for the tracer when using an agent that would add a flare item to the remote config payload. With this fix, the tracer will now correctly pull out the lib_config we need from the payload in order to implement remote config changes properly.
  • opentelemetry: Records exceptions on spans in a manner that is consistent with the otel specification
  • tracing: Ensures W3C tracecontext headers take precedence over all other header formats when incoming headers reference different spans in the same trace.

Other Changes

  • lib-injection: update base Alpine image to 3.20.

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

NewReleases is sending notifications on new releases.