Change8

v3.18.0rc1

📦 datadog-sdkView on GitHub →
5 features🐛 20 fixes4 deprecations🔧 11 symbols

Summary

This release introduces new features for API Security in AWS Lambda and enhanced LLM Observability dataset management, alongside numerous bug fixes across integrations like Kafka, LangChain, OpenAI, and Ray. Several older tracing and profiling methods are deprecated in preparation for v4.0.0.

Migration Steps

  1. If you were using `Span.set_tag_str`, migrate calls to use `Span.set_tag` instead.
  2. If you rely on the V1 stack profiler, note that it will be removed in v4.0. Ensure your profiling setup is compatible with V2.
  3. If you were using the environment variable `DD_PROFILING_API_TIMEOUT`, replace it with `DD_PROFILING_API_TIMEOUT_MS` to configure the profile upload timeout.

✨ New Features

  • API Security schema collection is now supported in AWS Lambda behind an Application Load Balancer or the Lambda Function URL service where the endpoint cannot be reliably known.
  • AppSec instrumentation for downstream request is now enabled by default for `urllib3` and `requests`. It does not require enabling APM instrumentation for `urllib3` anymore.
  • Add support for `threading.RLock` (reentrant lock) profiling. The Lock profiler now tracks both `threading.Lock` and `threading.RLock` usage.
  • Previous dataset versions can be optionally pulled by passing the `version` argument to `LLMObs.pull_dataset`
  • Datasets have new properties `version` and `latest_version` to provide information on the version of the dataset that is being worked with and the latest global version of the dataset, respectively

🐛 Bug Fixes

  • Resolved performance issue affecting coverage collection for Python 3.12+ in CI Visibility.
  • Resolved an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages.
  • Auto instrumented prompt templates no longer incorrectly include a `version` field when using langchain integration.
  • Fixed an issue where streamed responses that end before the first chunk is received would result in an `IndexError` in langchain integration.
  • Corrected the description of the `assessment` argument in `submit_evaluation()` for LLM Observability.
  • Resolved an issue where the `langchain` integration would incorrectly mark Azure OpenAI calls as duplicate llm operations even if the `openai` integration was enabled.
  • Resolved an issue where using async iteration with paginated OpenAI methods caused a `TypeError: 'async for' requires an object with __aiter__ method, got coroutine`.
  • Fix for potential `KeyError` exceptions in pytest plugin test runs when gevent is detected.
  • Ensure that code location information is added to entry spans when Code Origin is enabled remotely.
  • Fixed an issue where exceptions raised in Ray child spans were not properly recorded in the trace.
  • Fixed an issue where the tracer raised an error when submitting Ray tasks without explicitly calling `ray.init()`.
  • Stops instrumenting internal Ray actors (those starting with underscore) and adds `ray.data._internal` to the module denylist.
  • Fixed an issue where using weak hashing or cipher algorithms outside of a request context in IAST could raise an unhandled exception.
  • Prevents OpenTelemetry OTLP exporter connections from being traced by ddtrace by excluding internal gRPC and HTTP connections from tracing.
  • Fixed a potential race condition in the tracer.
  • Replaced deprecated `DD_PROFILING_API_TIMEOUT` with `DD_PROFILING_API_TIMEOUT_MS` for configuring profile upload timeout.
  • Upgrades echion to resolve issues where stack profiler could allocate large memory unnecessarily or loop infinitely on Python 3.13.
  • Fixed the Python Detector regular expression to also detect paths ending with only the major version number.
  • Fixed ddtrace internal logging when trace-log correlation is disabled, preventing `ValueError: Formatting field not found in record: 'dd.service'`.
  • Ensures compatibility with wrapt 2.0.0 in the tracer.

🔧 Affected Symbols

Span.set_struct_tagSpan.get_struct_tagSpan.set_tag_strSpan.set_tagLLMObs.pull_datasetthreading.RLockurllib3requestsclient.models.listray.initray.data._internal

⚡ Deprecations

  • Span.set_struct_tag is deprecated and will be removed in v4.0.0 with no direct replacement.
  • Span.get_struct_tag is deprecated and will be removed in v4.0.0 with no direct replacement.
  • Span.set_tag_str is deprecated and will be removed in version 4.0.0. Use Span.set_tag instead.
  • The V1 stack profiler is deprecated and will be removed in 4.0. V2 has been enabled by default since v2.20.0. `DD_PROFILING_STACK_V2_ENABLED=false` will no longer have an effect starting in 4.0.