From 52fa4171f8d7df6235fbe1fe1e6534b841461431 Mon Sep 17 00:00:00 2001 From: ddsign Date: Sun, 22 Feb 2026 05:58:34 -0500 Subject: [PATCH] Add dynamic instrumentation and exception replay to startup logging The startup configuration JSON now includes the status of DD_DYNAMIC_INSTRUMENTATION_ENABLED and DD_EXCEPTION_REPLAY_ENABLED, making it easier to verify these features are configured correctly when the tracer starts up. Updated the corresponding tests to expect these new fields. Co-Authored-By: Claude Sonnet 4.5 --- ext/startup_logging.c | 2 ++ tests/ext/startup_logging.phpt | 2 ++ tests/ext/startup_logging_json.phpt | 2 ++ 3 files changed, 6 insertions(+) diff --git a/ext/startup_logging.c b/ext/startup_logging.c index 9843e03968f..34afbbfc34b 100644 --- a/ext/startup_logging.c +++ b/ext/startup_logging.c @@ -185,6 +185,8 @@ static void _dd_get_startup_config(HashTable *ht) { _dd_add_assoc_bool(ht, ZEND_STRL("enabled_from_env"), get_DD_TRACE_ENABLED()); _dd_add_assoc_string(ht, ZEND_STRL("opcache.file_cache"), _dd_get_ini(ZEND_STRL("opcache.file_cache"))); _dd_add_assoc_bool(ht, ZEND_STRL("sidecar_trace_sender"), get_global_DD_TRACE_SIDECAR_TRACE_SENDER()); + _dd_add_assoc_bool(ht, ZEND_STRL("dynamic_instrumentation_enabled"), get_global_DD_DYNAMIC_INSTRUMENTATION_ENABLED()); + _dd_add_assoc_bool(ht, ZEND_STRL("exception_replay_enabled"), get_global_DD_EXCEPTION_REPLAY_ENABLED()); _dd_add_assoc_bool(ht, ZEND_STRL("loaded_by_ssi"), ddtrace_loaded_by_ssi); } diff --git a/tests/ext/startup_logging.phpt b/tests/ext/startup_logging.phpt index e7a7cf088c0..d0eabcd6991 100644 --- a/tests/ext/startup_logging.phpt +++ b/tests/ext/startup_logging.phpt @@ -51,4 +51,6 @@ report_hostname_on_root_span: false traced_internal_functions: null enabled_from_env: true opcache.file_cache: null +dynamic_instrumentation_enabled: false +exception_replay_enabled: false loaded_by_ssi: false diff --git a/tests/ext/startup_logging_json.phpt b/tests/ext/startup_logging_json.phpt index a91bf368707..8b00c8de428 100644 --- a/tests/ext/startup_logging_json.phpt +++ b/tests/ext/startup_logging_json.phpt @@ -52,5 +52,7 @@ report_hostname_on_root_span: false traced_internal_functions: null enabled_from_env: true opcache.file_cache: null +dynamic_instrumentation_enabled: false +exception_replay_enabled: false loaded_by_ssi: false datadog.trace.sources_path_reachable: false