v3.18.0
📦 datadog-sdkView on GitHub →
✨ 5 features🐛 23 fixes⚡ 4 deprecations🔧 15 symbols
Summary
This release introduces new features for API Security in AWS Lambda and enhanced lock profiling, alongside numerous bug fixes across integrations like LangChain, Ray, and OpenAI. Several older tracing span methods and the V1 stack profiler are deprecated in preparation for version 4.0.0.
Migration Steps
- For streamed chat/completions, if you require accurate token metrics, set stream_options={"include_usage": True} in the OpenAI request, as token counts will now default to being estimated.
- Replace calls to Span.set_tag_str with Span.set_tag.
✨ 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.
- Add support for threading.RLock (reentrant lock) profiling, tracking both threading.Lock and threading.RLock usage.
- LLMObs.pull_dataset now optionally supports pulling previous dataset versions by passing the version argument.
- Datasets now have new properties version and latest_version to provide information on dataset versions.
🐛 Bug Fixes
- Resolved performance issue affecting coverage collection for Python 3.12+ in CI Visibility.
- Fixed an issue where only the first message in a batch was dispatched to Data Streams Monitoring (DSM) when consuming multiple Kafka messages.
- Fixed auto instrumented prompt templates in langchain to omit the version field unless explicitly set by the user.
- Fixed an issue in langchain where streamed responses ending before the first chunk caused an IndexError.
- Corrected the description of the assessment argument in LLM Observability submit_evaluation().
- Resolved an issue in the bedrock integration where invoking cohere rerank models resulted in missing spans due to output formatting index errors.
- Resolved an issue where the langchain integration incorrectly marked Azure OpenAI calls as duplicate llm operations even if the openai integration was enabled; Azure OpenAI spans are now traced as workflow spans if an equivalent llm span from the openai integration exists.
- Fixed a TypeError: 'async for' requires an object with __aiter__ method, got coroutine when using async iteration with paginated OpenAI methods.
- Fixed potential KeyError exceptions in pytest runs when gevent is detected.
- Ensured 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().
- Stopped instrumenting internal Ray actors (starting with underscore) and added 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 connections from tracing.
- Fixed circular import when enabling multiple OpenTelemetry signals (metrics + logs) simultaneously.
- Fixed a potential race condition in the tracer.
- Fixed AssertionError exceptions being silently suppressed in the Lock profiler's _acquire method (when assertions are enabled).
- Upgraded echion to resolve an issue where the stack profiler could allocate excessive memory and loop infinitely on Python 3.13.
- Fixed the Python Detector regular expression to 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'.
- Ensured compatibility with wrapt 2.0.0.
- Fixed an issue where an application instrumented by ddtrace could crash at start, ensuring compatibility with zope.event==6.0.
🔧 Affected Symbols
Span.set_struct_tagSpan.get_struct_tagSpan.set_tag_strSpan.set_tagLLMObs.pull_datasetthreading.Lockthreading.RLockurllib3requestsopenailangchainbedrockraypytest pluginotel⚡ 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. DD_PROFILING_STACK_V2_ENABLED=false will no longer have an effect starting in 4.0.