Skip to content

Commit

Permalink
Fix signalfx.trace. ini prefix (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
agoallikmaa authored Nov 2, 2022
1 parent c2a86dd commit 32ac8c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ext/php7/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ static void dd_ini_env_to_ini_name(const zai_string_view env_name, zai_config_na
dd_copy_tolower(ini_name->ptr, env_name.ptr);
ini_name->ptr[sizeof("signalfx") - 1] = '.';
ini_name->len = env_name.len;

if (env_name.ptr == strstr(env_name.ptr, "SIGNALFX_TRACE_")) {
ini_name->ptr[sizeof("signalfx.trace") - 1] = '.';
}
} else {
ini_name->len = 0;
assert(false && "Unexpected env var name: missing 'DD_' prefix");
Expand Down
4 changes: 4 additions & 0 deletions ext/php8/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ static void dd_ini_env_to_ini_name(const zai_string_view env_name, zai_config_na
dd_copy_tolower(ini_name->ptr, env_name.ptr);
ini_name->ptr[sizeof("signalfx") - 1] = '.';
ini_name->len = env_name.len;

if (env_name.ptr == strstr(env_name.ptr, "SIGNALFX_TRACE_")) {
ini_name->ptr[sizeof("signalfx.trace") - 1] = '.';
}
} else {
ini_name->len = 0;
assert(false && "Unexpected env var name: missing 'DD_' prefix");
Expand Down
2 changes: 1 addition & 1 deletion signalfx-setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ function get_ini_settings($requestInitHookPath)
'description' => 'Enables or disables tracing (set by the installer, do not change it)',
],
[
'name' => 'ddtrace.request_init_hook',
'name' => 'signalfx.trace.request_init_hook',
'default' => $requestInitHookPath,
'commented' => false,
'description' => 'Path to the request init hook (set by the installer, do not change it)',
Expand Down

0 comments on commit 32ac8c3

Please sign in to comment.