Skip to content

Commit

Permalink
Use 'ddtrace.disable' instead of 'datadog.trace.enabled'
Browse files Browse the repository at this point in the history
  • Loading branch information
iamluc committed Sep 18, 2024
1 parent d64c859 commit 7240136
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion loader/dd_library_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void ddtrace_pre_minit_hook(void) {
}

if (disable_tracer) {
ddloader_ini_set_configuration(ZEND_STRL("datadog.trace.enabled"), ZEND_STRL("0"));
ddloader_ini_set_configuration(ZEND_STRL("ddtrace.disable"), ZEND_STRL("1"));
}
}

Expand Down
2 changes: 1 addition & 1 deletion loader/tests/functional/fixtures/opcache_jit.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function boolstr($bool) {
return ($bool ? 'YES' : 'NO');
}

echo "datadog.trace.enabled: ".boolstr(dd_trace_env_config('DD_TRACE_ENABLED'))."\n";
echo "ddtrace.disable: ".boolstr((bool) ini_get('ddtrace.disable'))."\n";

if (!extension_loaded('Zend OPcache')) {
echo "OPcache is not loaded\n";
Expand Down
8 changes: 4 additions & 4 deletions loader/tests/functional/test_incompatibility_jit.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"config" => "-dzend_extension=opcache -ddatadog.trace.cli_enabled=1",
"must_not_contain" => [$msg_disabled],
"must_contain" => [<<<EOT
datadog.trace.enabled: YES
ddtrace.disable: NO
OPcache is disabled
EOT
],
Expand All @@ -28,7 +28,7 @@
"config" => "-dzend_extension=opcache -dopcache.enable_cli=1 -ddatadog.trace.cli_enabled=1",
"must_not_contain" => [$msg_disabled],
"must_contain" => [<<<EOT
datadog.trace.enabled: YES
ddtrace.disable: NO
opcache_enabled: YES
jit.enabled: NO
jit.on: NO
Expand All @@ -43,7 +43,7 @@
"must_contain" => [
$msg_disabled,
<<<EOT
datadog.trace.enabled: NO
ddtrace.disable: YES
opcache_enabled: YES
jit.enabled: YES
jit.on: YES
Expand All @@ -59,7 +59,7 @@
"must_contain" => [
$msg_forced,
<<<EOT
datadog.trace.enabled: YES
ddtrace.disable: NO
opcache_enabled: YES
jit.enabled: YES
jit.on: YES
Expand Down

0 comments on commit 7240136

Please sign in to comment.