Repository navigation
4.18.0rc1
Pre-release
Pre-release
Estimated end-of-life date, accurate to within three months: 05-2027
See the support level definitions for more information.
Upgrade Notes
-
tracing
- Enable stats computation by default to compute RED metrics locally, which were previously computed by the agent. Set
DD_TRACE_STATS_COMPUTATION_ENABLED=falseto disable it. - The
DATADOG TRACER CONFIGURATIONstartup log is now a JSON object instead of a Python dictionary, and it is emitted wheneverDD_TRACE_STARTUP_LOGSis enabled, which is the default, even when theddtracelogger level is aboveINFO. SetDD_TRACE_STARTUP_LOGS=falseto disable it. The URLs it reports, such asagent_url, no longer include the user info, query, or fragment, which can hold credentials. - Changes the default OTLP protocol for metrics and logs from
grpctohttp/protobuf, matching traces, with default local endpoints on port 4318. SetOTEL_EXPORTER_OTLP_PROTOCOL=grpcor the signal-specificOTEL_EXPORTER_OTLP_METRICS_PROTOCOL/OTEL_EXPORTER_OTLP_LOGS_PROTOCOLtogrpcto keep using a gRPC collector. - Removes the obsolete
ddtrace[opentracing]installation extra; OpenTracing support was removed in v4.0. Applications that still need theopentracingpackage must install it directly. DD_TRACE_STARTUP_LOGSnow defaults totrue, soddtrace-runandddtrace.autolog startup diagnostics, such as a warning when the agent is not reachable. SetDD_TRACE_STARTUP_LOGS=falseto disable them.
- Enable stats computation by default to compute RED metrics locally, which were previously computed by the agent. Set
-
LLM Observability
LLMObs.activate_distributed_headers()no longer raises an exception when the request headers have no APM trace context. It now logs a debug message and returns.
-
CI visibility
- Uses the tested repository and revision consistently for test events, Test Impact Analysis requests and Git uploads, including custom and nested checkouts, while preserving explicit
DD_GIT_*overrides. Matching detached CI checkouts retain their CI branch and canonical repository URL; the checkout root and provider merge commit are reported separately from the original CI workspace.
- Uses the tested repository and revision consistently for test events, Test Impact Analysis requests and Git uploads, including custom and nested checkouts, while preserving explicit
-
App and API Protection
- Upgrades libddwaf to version 2.2.1.
-
ddtrace now requires
ddtrace-internal0.3.0, which carries thecodeownersimplementation that previously shipped inside ddtrace. The dependency itself is not new, but environments that install ddtrace from a private mirror or vendored wheelhouse must mirror the new version.
Deprecation Notes
- openfeature
DD_FFE_INTAKE_ENABLEDis deprecated and will be removed in 5.0.0. UseDD_FEATURE_FLAGS_EXPOSURES_DATADOG_LOGGING_ENABLEDinstead. Until then,DD_FFE_INTAKE_ENABLEDkeeps working. When both are set,DD_FEATURE_FLAGS_EXPOSURES_DATADOG_LOGGING_ENABLEDtakes precedence.
New Features
- App and API Protection
- API Security endpoint discovery now reports the routes of aiohttp web applications traced with
ddtrace.contrib.aiohttp.trace_app, including the routes of their sub-applications, when the application starts. SetDD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED=falseto disable it. - Enables runtime vulnerability reachability detection in AWS Lambda when
DD_APPSEC_SCA_ENABLED=true.
- API Security endpoint discovery now reports the routes of aiohttp web applications traced with
- AI Guard
- MCP tools converted with the Anthropic SDK
mcp_toolandasync_mcp_toolhelpers are now evaluated before each call is sent to the MCP server, identifying the server from its MCP SDK client transport. Only the scheme, host and port of a remote server URL, or the command of a stdio server as configured with the package orpython -mmodule name it runs, are reported; headers, environment variables and other arguments never are. SetDD_AI_GUARD_MCP_ENABLED=falseto disable. - LangChain tool calls to MCP tools loaded with
langchain-mcp-adapters(0.2.0 or later) are now evaluated with the MCP server that runs them, including calls made outside an agent, and are blocked before the MCP request is sent. Only the server name, transport, URL scheme, host and port, or stdio command and the package or module it runs are reported. SetDD_AI_GUARD_MCP_ENABLED=falseto disable. - Evaluations of remote MCP tools run by the OpenAI Responses API now identify the MCP server of each call, and MCP approval requests are evaluated before the application can approve them. Responses streams whose MCP tools can request approval are buffered until that evaluation completes, even when
DD_AI_GUARD_ANALYZE_STREAM_RESPONSES_ENABLEDis off, and so are streams that use a reusable prompt unlessDD_AI_GUARD_BLOCKisfalse. Only the scheme, host and port of the MCP server URL are reported: credentials, headers, and the URL user information, path, query string and fragment never are. SetDD_AI_GUARD_MCP_ENABLED=falseto disable. - Evaluates the tool calls of MCP servers configured in the OpenAI Agents SDK before each call reaches the server, including direct
server.call_toolcalls. A blocking verdict raisesAIGuardAbortErrorand the call is not sent. SetDD_AI_GUARD_MCP_ENABLED=falseto disable. - The LiteLLM proxy guardrail now evaluates text completions, and it evaluates streamed answers after the last chunk. With DD_AI_GUARD_ANALYZE_STREAM_RESPONSES_ENABLED set to true, it holds a streamed answer until AI Guard evaluates it, and it can block the answer.
- MCP tools converted with the Anthropic SDK
- aiohttp
- With
config.aiohttp.disable_stream_timing_for_mem_leak=False(default), request spans now finish when request execution completes for both ordinary and streaming HTTP responses. WebSocket upgrade spans continue to finish at the handshake, independently of the socket lifetime.
- With
- algoliasearch
- This introduces tracing support for
algoliasearch4.x. Calls tosearch_single_indexon bothSearchClientSyncandSearchClient(async) create analgoliasearch.searchspan.
- This introduces tracing support for
- anthropic
- Adds tracing and LLM Observability support for
anthropic1.x and 2.x.
- Adds tracing and LLM Observability support for
- azure frontdoor
- Add inferred proxy span support for Azure Front Door (
azure-fd). Enable it by settingDD_TRACE_INFERRED_PROXY_SERVICES_ENABLED=true.
- Add inferred proxy span support for Azure Front Door (
- botocore
- Adds
DD_TRACE_AWS_SDK_<SERVICE>_ENABLED(for exampleDD_TRACE_AWS_SDK_KINESIS_ENABLED=false) to skip instrumenting calls to a specific AWS service. - Adds the
aws.sqs.queue.url,aws.stream.arnandaws.step_functions.state_machine.arntags to SQS, Kinesis and Step Functions client spans when the request parameters include a queue URL, stream ARN or state machine ARN, and theaws.table.arnandaws.function.arntags to DynamoDB and Lambda client spans when the request names the table or function by its full ARN. This also applies to theaiobotocoreintegration. The tags are not set whenDD_AWS_TAG_NO_PARAMSis enabled.
- Adds
- CI Visibility
- Adds diagnostic telemetry for the number of pages and time needed to retrieve known tests.
- google_cloud_pubsub
- Adds the
gcp.pubsub.topic.nametag to publish spans and thegcp.pubsub.subscription.nametag to pull and push receive spans. Each tag holds the full resource path (projects/<project>/topics/<topic>orprojects/<project>/subscriptions/<subscription>) and is only set when that full path is known. Existing tags are unchanged.
- Adds the
- Code Security (IAST)
- Adds vulnerability detection for aiohttp web applications traced with
ddtrace.contrib.aiohttp.trace_app. Request headers, query parameters and form fields are only tracked with multidict 6.4 or later. Uploaded files and request bodies read throughrequest.contentorrequest.multipart()are not tracked. - Detects server-side request forgery (SSRF) when a URL built from user input is passed to the
aiohttpclient, throughaiohttp.ClientSessionrequest methods,ClientSession.ws_connectoraiohttp.request.
- Adds vulnerability detection for aiohttp web applications traced with
- LLM Observability
- LLM Observability traces now stay connected across services that drop the APM trace headers. The distributed context is also sent in the W3C
baggageheader, which requiresbaggageinDD_TRACE_PROPAGATION_STYLE(the default) and uses up to 8 of the 64 baggage items. In baggage, the parent agent name is truncated to 128 bytes (percent-encoded). Upgrade every service in the request path for full coverage. - Adds support for tracing Google GenAI Decisions API calls (
client.decisions.createandclient.aio.decisions.create, google-genai 3.2.0 and later), capturing the request with its questions, the answers, and token usage.
- LLM Observability traces now stay connected across services that drop the APM trace headers. The distributed context is also sent in the W3C
- openfeature
- Agentless Feature Flagging configuration requests now include the service name.
- Adds an OpenFeature hook that passes each completed flag evaluation to a callback with the Datadog exposure decision and the selected split's features.
- Adds
DD_FEATURE_FLAGS_EXPOSURES_DATADOG_LOGGING_ENABLED, which controls whether feature flag exposure events are sent to Datadog. It defaults totrue.
- opentelemetry
- The
DATADOG TRACER CONFIGURATIONstartup log now reports the effective OpenTelemetry settings for traces, logs, and metrics, keyed by environment variable (for exampleOTEL_TRACES_EXPORTERandOTEL_EXPORTER_OTLP_TRACES_ENDPOINT), with OTLP header values redacted.
- The
- runtime metrics
- Adds support for exporting runtime metrics over OTLP, under their OpenTelemetry semantic convention names, when
DD_RUNTIME_METRICS_ENABLEDandDD_METRICS_OTEL_ENABLEDare both true.
- Adds support for exporting runtime metrics over OTLP, under their OpenTelemetry semantic convention names, when
- Profiling
- The profiler now has experimental support for remote configuration. Set
DD_PROFILING_ENABLED=falseto prevent Remote Configuration from starting the Profiler.
- The profiler now has experimental support for remote configuration. Set
Bug Fixes
- AAP
- Fixes an issue where user signup events reported with a collection mode other than
sdkrecorded that mode under an incorrect span tag, so App and API Protection did not show how the signup event was collected. - Fixes an issue where an error while initializing the WAF could be raised in application code during the first traced operation. AAP now logs an error and stays disabled for that process instead.
- Fixes an issue where user signup events reported with a collection mode other than
- AI Guard
- Fixes an issue where LangChain tool calls with malformed arguments are not evaluated, so a model response containing only such calls bypasses AI Guard.
- Fixes an issue where the full conversation is reported on the AI Guard span when
DD_AI_GUARD_MAX_MESSAGES_LENGTHis set to0. - Fixes an issue where evaluating async streamed OpenAI, Anthropic, or LangChain responses, or single-prompt async LangChain calls, with
DD_AI_GUARD_ANALYZE_STREAM_RESPONSES_ENABLED=trueblocked the asyncio event loop, stalling other tasks until the evaluation completed. - Fixes an issue where embeddings, audio transcription, and some other requests fail when the LiteLLM proxy guardrail uses the pre_call or during_call mode.
- Fixes an issue where the LiteLLM proxy guardrail evaluates an answer without its real prompt when it uses only the post_call mode.
- Fixes an issue where AI Guard evaluates chat and text completion prompts two times when the LiteLLM proxy guardrail uses pre_call and post_call modes.
- Fixes an issue where AI Guard events in aiohttp applications were missing the client IP and user agent when App and API Protection threat detection is disabled.
- aiohttp
- Fixes unfinished request spans when both a parent application and its sub-application are instrumented with
trace_app. - Fixes missing response status, headers, and resource information on request spans when an earlier response preparation callback fails.
- Fixes missing or incorrect response metadata when timeout or other middleware runs request handlers in child tasks.
- Fixes an issue where request spans were missing
network.client.ipwhen client IP collection is enabled withDD_TRACE_CLIENT_IP_ENABLEDand App and API Protection is disabled. - Fixes memory retention across keep-alive requests and unfinished request spans when streaming handlers fail or requests are cancelled.
- Fixes unfinished request spans when both a parent application and its sub-application are instrumented with
- LLM Observability
- Fixes
anthropicspans droppingtemperaturefrom their metadata onanthropic1.x and 2.x, where the SDK takes it throughextra_bodyinstead of a request keyword.extra_bodyis now read as well, and an explicit keyword argument takes precedence. - Fixes an issue where Amazon Nova calls made with
invoke_model_with_response_streamthrough the botocore integration reported 0 input and output tokens. - Fixes an issue where OpenAI Agents spans recorded internal information. Only non-secret settings and the scheme, host and port of MCP server URLs are now recorded.
- Fixes an issue where a Bedrock
ConverseStreamtool call whosetoolUseinput was already a dict raised aTypeErrorfrom the traced stream, so the application's request failed. The parsed input is now recorded as the tool call arguments. - Fixes an issue where OpenAI Decisions API spans (
client.decisions.create) dropped request options, JSON input parts, and custom tool call outputs, and recorded the questions in metadata instead of the span input. The span input is now the request as sent, and the span output is the response with the model and answers. - Fixes an issue where TypeSafe System One spans recorded every
extra_bodyfield in the span input. Only request fields are now recorded, since other fields can carry credentials.
- Fixes
- asgi
- Fixes request span completion order for mounted applications so child request spans finish before their enclosing request spans, while preserving the enclosing spans' response completion timestamps.
- botocore
- Fixes Kinesis trace context injection pushing a record over the 1 MiB limit. The size check now counts the UTF-8 bytes of the data plus the partition key.
- Fixes increased latency on the first AWS SDK call when cloud request and response payload tagging are disabled, including the first invocation of an AWS Lambda function.
- bottle
- Fixes missing configured response-header tags for response objects returned or raised by route callbacks.
- Fixes an issue where response metadata collection errors replace application responses or exceptions. Fixes missing HTTP status tags and incorrect span error classification when response headers cannot be collected.
- CI Visibility
- Fixes test suite events from the
pytestplugin missing thetest.moduleandtest.module_pathtags, which kept Datadog from recording test suite durations per module. - Fixes an issue where collecting per-test code coverage slowed down pytest's test collection and the start of each test process, more so in projects that import many modules.
- Fixes an issue where Test Optimization lost test results in suites that block network access while their tests run, such as with pytest-socket, and failed the tests during which it sent them when the suite checks for blocked connections. Test Optimization now sends its requests with ddtrace's native HTTP client, which doesn't go through Python's socket module.
- Fixes an issue where Test Optimization turned itself off with a Datadog Agent on a Unix domain socket, as with
DD_TRACE_AGENT_URL=unix:///path/to/apm.socketor with/var/run/datadog/apm.socket, which it uses when that file exists and no agent URL, host or port is set: it requested the socket's path followed by/infoand got a 404.
- Fixes test suite events from the
- dynamic instrumentation
- Metric probes whose value expression fails to evaluate, or does not evaluate to a number, now report the evaluation error instead of silently emitting nothing while the probe appears healthy.
- Fixes an issue where Dynamic Instrumentation could fail to start with an import deadlock or a "partially initialized module" import error, most often on Python 3.14, when Code Origin for Spans or Exception Replay was enabled at the same time.
- aiobotocore
- Fixes an issue where spans were tagged with the
DD_SERVICEvalue instead ofaws.<endpoint>under the default (v0) span attribute schema. The service name now matches thebotocoreintegration. UseDD_AIOBOTOCORE_SERVICEto set a custom service name.
- Fixes an issue where spans were tagged with the
- tracing
- Fixes the client IP reported for aiohttp and Sanic requests that repeat an IP header such as
X-Forwarded-For. The header lines are now read in order as one comma-separated value, instead of only one of them, so a repeatedDD_TRACE_CLIENT_IP_HEADERheader is ignored like any value with several addresses. - Fixes a spurious "failed to start writer service" warning when multiple threads send their first traces concurrently.
- Fixes OTLP logs and metrics export failures caused by uppercase protocol names or invalid protocol or compression settings; invalid values now warn and fall back to HTTP/protobuf or no compression. Compression settings also honor local and fleet configuration.
- Fixes an issue where setting
OTEL_SDK_DISABLED=truedid not disable tracing, including OTLP trace export configured withOTEL_TRACES_EXPORTER=otlp.DD_TRACE_ENABLEDstill takes precedence when set. - ddtrace no longer overrides
SIGTERMandSIGINTwhen the application ignores them. Before this fix, those signals caused the process to exit when running with ddtrace. - Fixes an issue where ddtrace import errors prevent applications launched with
ddtrace-runfrom starting. Errors are reported and application startup continues.
- Fixes the client IP reported for aiohttp and Sanic requests that repeat an IP header such as
- aws_durable_execution_sdk_python
- Fixes tracing with
aws-durable-execution-sdk-python3.x, where workflow spans were missing theaws.durable.replayedtag, trace context was not saved across suspend and resume, andmapandparallelspans could report a branch's operation id.
- Fixes tracing with
- App and API Protection
- Fixes incorrect user emails in Django automatic login events when
DD_USER_MODEL_EMAIL_FIELDis configured. - Fixes missing unsafe YAML deserialization findings when Interactive Application Security Testing (IAST) is enabled and input is passed using PyYAML's
streamkeyword argument. - Fixes missing SSRF detections when an outgoing request made from an HTTPX event hook or auth flow, or from a
requestsresponse hook, triggers the same rule as the request that started it. - Fixes automatic login events ignoring
DD_USER_MODEL_LOGIN_FIELDfor the reported login or using the display name as the login whenDD_USER_MODEL_NAME_FIELDis configured. - Fixes missing user attributes on later requests when the same metadata dictionary is reused for authenticated-user tracking.
- Fixes incorrect user emails in Django automatic login events when
- profiling
- Sampled exceptions are now scaled by the sampling interval so the reported count reflects the true volume. Users will see exception rates ~sampling_interval times more than what was shown previously (default is 100)
- Fixes an issue where
asyncio.as_completedandasyncio.shieldraiseRuntimeErrorwhen called from synchronous code. - Fixes an issue where asyncio task samples are missing, or report greatly inflated wall time, on Python 3.14 patch releases other than the one
ddtracewas built with.
- fastapi
- Fixes an issue where request span resource names and
http.routetags are overwritten by a top-level catch-all route when using included routers with FastAPI 0.137 or later. - Fixes raw-path resource names and missing
http.routetags on inner request spans when a mounted sub-application uses included routers with FastAPI 0.137 or later.
- Fixes an issue where request span resource names and
- grpc
- Fixes unfinished asynchronous client spans when calls are cancelled or streaming responses are not consumed.
- django
- Fixes an issue where enabling Interactive Application Security Testing (IAST) suppresses response header validation errors instead of allowing the application to handle them.
- Code Security (IAST)
- Fixes incorrect taint positions in vulnerability evidence after encoding or decoding text containing multiple tainted values.
- Fixes missing insecure cookie findings in Runtime Code Analysis when a cookie name is passed positionally and its value is passed by keyword.
- Fixes an issue where vulnerability reports with both redacted and non-redacted sources could omit the values of non-redacted sources or keep the values of redacted sources, depending on the order of the sources in the evidence.
- Fixes an issue where runtime stack traces can be missing from IAST findings for requests nested under other spans, including when a parent span has already finished.
- Fixes an issue where path traversal vulnerabilities are not reported when the path is passed by keyword, as in
os.remove(path=...),shutil.copy(src=...),glob.glob(pathname=...)ortarfile.open(name=...). - Fixes an issue where credentials embedded in a URL with a scheme other than
httporhttps(for exampleftp://user:password@host) are not redacted in SSRF and unvalidated redirect vulnerability evidence, and improves the performance of this redaction. - Fixes missed vulnerability reports when custom validators receive keyword arguments.
- Code Security
- Fixes an issue where custom security controls configured through
DD_IAST_SECURITY_CONTROLS_CONFIGURATIONwith the documentedCMDIalias forCOMMAND_INJECTIONwere rejected and not applied.
- Fixes an issue where custom security controls configured through
- litellm
- Fixes an issue where
litellm.completionandlitellm.acompletioncalls using thefallbacksparameter produced two LLM Observability spans with identical token usage, double-counting tokens and cost. - Fixes an issue where LLM Observability does not record an LLM span for a non-streamed OpenAI chat request. This issue occurs with litellm 1.108.1 and later versions when you enable the OpenAI integration.
- Fixes an issue where
- crewai, mcp, google_adk
- Fixes an issue where spans reported
datadogas the source of their service name instead of how the service name was set.
- Fixes an issue where spans reported
- logging
- Fix a
TypeErrorraised while formatting internal product logs that carry exception information on Python 3.9.
- Fix a
- internal
- Fixes an issue where a background thread, such as the profiler's scheduler, could keep running after it was stopped shortly after a fork.
- Fixes an issue where forking from a worker process, for example spawning a subprocess with
asyncio.create_subprocess_execon uvloop in a gunicorn worker, was delayed by up to half the Remote Configuration poll interval (2.5 seconds by default).
- runpy
- Fix a
KeyErrorraised afterrunpy.run_modulewhen the module was not registered insys.modules, which also hid any error raised by the module being run.
- Fix a
- SCA
- Fixes missing or incorrect vulnerability reachability reports when multiple advisories have overlapping function targets.
- vertexai, pydantic_ai
- Fixes an issue where spans reported
datadogas the source of their service name instead of how the service name was set.
- Fixes an issue where spans reported
- kafka
- Fixes an issue where consumer spans were missing the
messaging.kafka.bootstrap.serverstag, and where consumer spans were missingkafka.cluster_idwhen a producer in the same process listed the same brokers in a different order or with different spacing.
- Fixes an issue where consumer spans were missing the
- openfeature
- Fixes an issue where an exposure was sent to Datadog for an evaluation that a later OpenFeature
afterhook turned into an error. - Fixes an issue where provider initialization waits for the full initialization timeout when the agentless configuration source cannot start, for example when
DD_API_KEYis not set for the default Datadog endpoint. Initialization now fails immediately with an error that names the cause, and flag evaluations return their default values. - Fixes an issue where a provider stops sending flag evaluation metrics, evaluation counts, and span enrichment after shutdown and re-initialization.
- Fixes an issue where flag evaluations return the default value with an
INVALID_CONTEXTerror when an evaluation context attribute is not astr,int,float,boolorNonevalue, for example adict, alistor adatetime. Such attributes are now ignored: the flag returns its evaluated value instead of the default, and targeting rules that reference such an attribute treat it as absent.
- Fixes an issue where an exposure was sent to Datadog for an evaluation that a later OpenFeature
- opentelemetry
- Fixes an issue where setting
OTEL_SDK_DISABLED=truetogether withDD_METRICS_OTEL_ENABLED=trueorDD_LOGS_OTEL_ENABLED=truestill set up OpenTelemetry metrics or logs support and disabled log injection.OTEL_SDK_DISABLED=truenow keeps both features disabled. - Fixes an issue where setting
OTEL_SDK_DISABLED=falseenabled OpenTelemetry traces, metrics, and logs support, and overrodeOTEL_LOGS_EXPORTER=none.OTEL_SDK_DISABLED=falseand an empty value are now treated as the default and no longer enable these features; useDD_TRACE_OTEL_ENABLED,DD_METRICS_OTEL_ENABLED, orDD_LOGS_OTEL_ENABLEDinstead. - Fixes an issue where comma-separated values of
OTEL_TRACES_EXPORTER,OTEL_METRICS_EXPORTERandOTEL_LOGS_EXPORTER, such asotlp,zipkin, are ignored as unsupported. ddtrace still exports each signal to a single exporter, and now falls back to the supported entry of the list:otlpenables OTLP export, otherwisenonedisables the signal. Unsupported entries are ignored with a warning. - When only
OTEL_EXPORTER_OTLP_ENDPOINTis set, the OTLP logs and metrics endpoints in the resolved configuration now derive from it, as the OpenTelemetry SDK exporters do, instead of defaulting to the Datadog Agent. Where logs and metrics are exported is unchanged.
- Fixes an issue where setting
- vllm
- Fixes distributed trace context not being propagated to
vllm.requestspans with vLLM >= 0.33.0 when no OTLP traces endpoint is configured, because vLLM then dropstrace_headersinAsyncLLM.add_request.
- Fixes distributed trace context not being propagated to
Other Changes
- perf
- Reduces the overhead of importing
ddtraceand starting instrumented applications. - Reduces application startup time when using
ddtrace-run.
- Reduces the overhead of importing
- tracing
- Reduces OTLP trace payload size by moving shared tracer tags to resource attributes.
- LLM Observability
- TypeSafe System One spans no longer include token usage in the span output, matching OpenAI Decisions API spans. Token counts are still recorded as span metrics.
- App and API Protection
- Updates the default WAF rules to 1.20.0, expanding detection coverage and reducing false positives for server-side template injection.