Skip to content

Commit f4ce0bf

Browse files
p-datadogp-ddsignclaude
authored
Add dynamic instrumentation and exception replay to startup logging (#3667)
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: ddsign <[email protected]> Co-authored-by: Claude Sonnet 4.5 <[email protected]>
1 parent e123921 commit f4ce0bf

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

ext/startup_logging.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ static void _dd_get_startup_config(HashTable *ht) {
185185
_dd_add_assoc_bool(ht, ZEND_STRL("enabled_from_env"), get_DD_TRACE_ENABLED());
186186
_dd_add_assoc_string(ht, ZEND_STRL("opcache.file_cache"), _dd_get_ini(ZEND_STRL("opcache.file_cache")));
187187
_dd_add_assoc_bool(ht, ZEND_STRL("sidecar_trace_sender"), get_global_DD_TRACE_SIDECAR_TRACE_SENDER());
188+
_dd_add_assoc_bool(ht, ZEND_STRL("dynamic_instrumentation_enabled"), get_global_DD_DYNAMIC_INSTRUMENTATION_ENABLED());
189+
_dd_add_assoc_bool(ht, ZEND_STRL("exception_replay_enabled"), get_global_DD_EXCEPTION_REPLAY_ENABLED());
188190

189191
_dd_add_assoc_bool(ht, ZEND_STRL("loaded_by_ssi"), ddtrace_loaded_by_ssi);
190192
}

tests/ext/startup_logging.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,6 @@ report_hostname_on_root_span: false
5151
traced_internal_functions: null
5252
enabled_from_env: true
5353
opcache.file_cache: null
54+
dynamic_instrumentation_enabled: false
55+
exception_replay_enabled: false
5456
loaded_by_ssi: false

tests/ext/startup_logging_json.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ report_hostname_on_root_span: false
5252
traced_internal_functions: null
5353
enabled_from_env: true
5454
opcache.file_cache: null
55+
dynamic_instrumentation_enabled: false
56+
exception_replay_enabled: false
5557
loaded_by_ssi: false
5658
datadog.trace.sources_path_reachable: false

0 commit comments

Comments
 (0)