A more elaborate summary of the breaking changes can be found in our upgrading guide UPGRADE-2.0.md.
Breaking changes
- Ship the tracer, the profiler and AppSec as a single
ddtrace.soextension;datadog-profiling.soandddappsec.soare no longer shipped #4179, #4369- Loading an old
ddappsec.sotogether withddtrace.sois a fatal startup error.datadog-setup.phpdeletes a leftoverddappsec.soand comments outdatadog-profiling.soentries. - PECL builds include profiling and AppSec only when configured with
--enable-ddtrace-profilingand--enable-ddtrace-appsec.
- Loading an old
- Profiling is now opt-in:
DD_PROFILING_ENABLEDdefaults tofalse. Usedatadog-setup.php --enable-profilingor setdatadog.profiling.enabled=On. When upgrading an installation that loadeddatadog-profiling.so,datadog-setup.phpkeeps profiling enabled #4179 - Use the sidecar as the default trace sender on all PHP versions (previously PHP 8.3+ and Windows only);
DD_TRACE_SIDECAR_TRACE_SENDER=0selects the in-process sender #4453 - Enable client-side stats computation by default; disable it with
DD_TRACE_STATS_COMPUTATION_ENABLED=false. Stats are computed only with the sidecar trace sender #4498, #4510 - Change how span data is stored and serialized #4453
SpanData::$metaandSpanData::$metricsare deprecated views onto the newSpanData::$attributes.- Legacy
DDTrace\Span:setTag($key, null)andsetMetric($key, null)remove the key, boolean tags become"true"/"false"(previously"1"/""), andgetAllTags()also returnsservice.name,operation.nameandspan.type. - A non-empty
$tagsin#[DDTrace\Trace]still works but raisesE_DEPRECATED. Use$attributesinstead. SpanLinkandSpanEventno longer implementJsonSerializable.
- Remove trace analytics: the
DD_TRACE_ANALYTICS_ENABLED,DD_TRACE_<INTEGRATION>_ANALYTICS_ENABLEDandDD_TRACE_<INTEGRATION>_ANALYTICS_SAMPLE_RATEsettings (and theirDD_<INTEGRATION>_ANALYTICS_*aliases),DDTrace\Config\integration_analytics_enabled()andDDTrace\Config\integration_analytics_sample_rate(). Theanalytics.eventtag is no longer mapped to_dd1.sr.eausr#4453 - Remove
DD_TRACE_WARN_LEGACY_DD_TRACEand the internal functionsdd_trace_serialize_msgpack(),dd_trace_send_traces_via_thread(),dd_trace_buffer_span(),dd_trace_coms_trigger_writer_flush(),dd_trace_reset()anddd_trace_noop()#4453 - Deprecate (with
E_DEPRECATED)DDTrace\trace_id(),DDTrace\current_context(),ddtrace_config_app_name(),ddtrace_config_distributed_tracing_enabled(),ddtrace_config_trace_enabled(),dd_trace_set_trace_id(),dd_trace_compile_time_microseconds(),dd_trace_function()anddd_trace_method()#4453
Performance
- Using the new trace protocol significantly reduces the overhead of our sidecar process. Make sure to have at least datadog-agent version
7.79installed, to actually use it. Otherwise it will fall back to the old one, incurring a conversion penalty.
All products
Changed
- Reduce sidecar memory usage: an idle sidecar thread no longer keeps a 4 MiB IPC receive buffer resident DataDog/libdatadog#2743
- Asynchronously watch the sidecar for being alive #4511
Fixed
- Fix heap corruption in a newly forked worker whose first request fails while PHP parses POST data, if PHP logged a line during module startup (e.g. the SSI loader with
DD_TRACE_DEBUG) #4468 - Fix a race between writers and a forced drain of the sidecar's shared-memory buffers, e.g. at shutdown DataDog/libdatadog#2885
- Fix a file descriptor leak in the sidecar's remote config handling, and stop remote config indexes from pointing at files that were already removed DataDog/libdatadog#2880
- Fix sidecar connections on macOS closing on messages within 16 bytes of the socket buffer limit DataDog/libdatadog#2743
- Drop the chmod of the removed appsec lib dir in the installer #4518
Internal
Tracer
Added
- Send traces using the V1 efficient trace payload protocol to agents that support it (7.79+), falling back to v0.4 otherwise.
DD_TRACE_AGENT_PROTOCOL_VERSION=0.4always sends v0.4 #4453 - Fetch feature flag configuration from the Datadog CDN without an agent, enabled with
DD_FEATURE_FLAGS_CONFIGURATION_SOURCE=agentless. Exposures and evaluation counts then go straight to the intake, usingDD_API_KEYandDD_SITE#4312, #4489 - Enable and disable Data Streams Monitoring at runtime via Remote Config #4472
Changed
- Keep the PHP type of span, span link and span event attribute values: numbers and booleans are sent typed, and arrays are nested.
http.status_code,env,versionand IDs stay strings. Spans get a typedSpanData::$attributesstore and the$env,$version,$componentand$spanKind(DDTrace\SpanKind) properties, and#[DDTrace\Trace]accepts$attributes,$kindand$component#4453
Fixed
- Honour
DD_SITEfor agentless trace submission (DD_TRACE_AGENTLESS), which always sent traces todatadoghq.com#4501 - Attribute feature flag evaluation counts to the application's service, env and version DataDog/libdatadog#2716
Internal
- Stop sending
app-startedandapp-closingtelemetry events from forked children DataDog/libdatadog#2837
Profiling
Internal
- Move PHP-independent Rust code, including profile aggregation and export, into the shared SSI library
libdatadog_php.so#4455
AppSec
Fixed
- Keep the trace of a request blocked by AppSec during request startup when
DD_TRACE_AUTO_FLUSH_ENABLED=1is set on a web SAPI #4445 - Recover when a startup bailout skipped the previous request's shutdown. This could release freed memory or leave the next request unprotected #4465
- Apply the tracer's query string filtering and obfuscation to the
http.urltag set by AppSec #4467