From e516cba16741a35e8160130f05d4d0650c2761df Mon Sep 17 00:00:00 2001 From: Rey Abolofia Date: Mon, 16 Nov 2026 22:48:47 -0800 Subject: [PATCH 1/2] [SVLS-10161] feat: route feature flag config through the extension when no API key is set Co-Authored-By: Claude Opus 5.5 --- scripts/datadog_wrapper | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/datadog_wrapper b/scripts/datadog_wrapper index eb40c51bf..7c90e5f33 100644 --- a/scripts/datadog_wrapper +++ b/scripts/datadog_wrapper @@ -56,6 +56,14 @@ export DD_TRACE_STATS_COMPUTATION_ENABLED="${DD_TRACE_STATS_COMPUTATION_ENABLED: debug_log "DD_TRACE_STATS_COMPUTATION_ENABLED: $DD_TRACE_STATS_COMPUTATION_ENABLED" +# When the tracer has no API key, load feature flag config through the +# extension, which adds the key it resolved (e.g. from DD_API_KEY_SECRET_ARN). +# The variables are every API key setting dd-trace-java reads. +if [[ "$DD_API_KEY$DD_API_KEY_FILE$DD_PROFILING_API_KEY$DD_PROFILING_API_KEY_FILE$DD_PROFILING_APIKEY$DD_PROFILING_APIKEY_FILE" =~ ^[[:space:]]*$ ]] +then + export DD_FEATURE_FLAGS_CONFIGURATION_SOURCE_AGENTLESS_BASE_URL="${DD_FEATURE_FLAGS_CONFIGURATION_SOURCE_AGENTLESS_BASE_URL:-http://127.0.0.1:8126}" +fi + # if it is .NET if [[ "$AWS_EXECUTION_ENV" == *"dotnet"* ]] then From fa985a6f70271b5481d4b423ff18968a02c4ff82 Mon Sep 17 00:00:00 2001 From: Rey Abolofia Date: Mon, 16 Nov 2026 22:50:52 -0800 Subject: [PATCH 2/2] fix: also skip the feature flag base URL when DATADOG_API_KEY is set dd-trace-js reads DATADOG_API_KEY as an alias of DD_API_KEY, and Node uses this wrapper for AppSec. The extension does not read that variable, so routing those customers through it would break flags that work today. Co-Authored-By: Claude Opus 5.5 --- scripts/datadog_wrapper | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/datadog_wrapper b/scripts/datadog_wrapper index 7c90e5f33..b1499a44c 100644 --- a/scripts/datadog_wrapper +++ b/scripts/datadog_wrapper @@ -58,8 +58,9 @@ debug_log "DD_TRACE_STATS_COMPUTATION_ENABLED: $DD_TRACE_STATS_COMPUTATION_ENABL # When the tracer has no API key, load feature flag config through the # extension, which adds the key it resolved (e.g. from DD_API_KEY_SECRET_ARN). -# The variables are every API key setting dd-trace-java reads. -if [[ "$DD_API_KEY$DD_API_KEY_FILE$DD_PROFILING_API_KEY$DD_PROFILING_API_KEY_FILE$DD_PROFILING_APIKEY$DD_PROFILING_APIKEY_FILE" =~ ^[[:space:]]*$ ]] +# The variables are every API key setting dd-trace-java reads, plus +# DATADOG_API_KEY, which dd-trace-js reads (Node uses this wrapper for AppSec). +if [[ "$DD_API_KEY$DATADOG_API_KEY$DD_API_KEY_FILE$DD_PROFILING_API_KEY$DD_PROFILING_API_KEY_FILE$DD_PROFILING_APIKEY$DD_PROFILING_APIKEY_FILE" =~ ^[[:space:]]*$ ]] then export DD_FEATURE_FLAGS_CONFIGURATION_SOURCE_AGENTLESS_BASE_URL="${DD_FEATURE_FLAGS_CONFIGURATION_SOURCE_AGENTLESS_BASE_URL:-http://127.0.0.1:8126}" fi