Skip to content

Commit e8bf40c

Browse files
authored
[APMSVLS-433] Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default (#1186)
## Overview We have confirmed that Java now has enabled client-side stats by default. This should be disabled. The datadog_wrapper file is where we should add this configuration env var. [datadog-lambda-extension/scripts/datadog_wrapper at 1454b86 · DataDog/datadog-lambda-extension](https://github.com/DataDog/datadog-lambda-extension/blob/1454b861409ff49478c25cc5ece68efb46374add/scripts/datadog_wrapper) It is the script that is run prior to the execution of a lambda function. We will want to set DD_TRACE_STATS_COMPUTATION_ENABLED=false. We should do this globally in that file, as opposed to just for Java, since eventually we will need it from dotnet as well. ## Testing ### 1. Java lambda function e2e testing app - **CASE 1:** `DD_TRACE_STATS_COMPUTATION_ENABLED` not configured in AWS UI - `tracerMetricsEnabled=false` in tracer debug logs - **CASE 2:** `DD_TRACE_STATS_COMPUTATION_ENABLED=true` configured in AWS UI - `tracerMetricsEnabled=true` in tracer debug logs ### 2. .NET lambda function e2e testing app - **CASE 1:** `DD_TRACE_STATS_COMPUTATION_ENABLED` not configured in AWS UI - `"stats_computation_enabled": false` in tracer debug logs - **CASE 2:** `DD_TRACE_STATS_COMPUTATION_ENABLED=true` configured in AWS UI - `"stats_computation_enabled": true` in tracer debug logs
1 parent e6580ea commit e8bf40c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

scripts/datadog_wrapper

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ fi
4444

4545
debug_log "The runtime is $AWS_EXECUTION_ENV"
4646

47+
# Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default for all runtimes
48+
export DD_TRACE_STATS_COMPUTATION_ENABLED="${DD_TRACE_STATS_COMPUTATION_ENABLED:-false}"
49+
50+
debug_log "DD_TRACE_STATS_COMPUTATION_ENABLED: $DD_TRACE_STATS_COMPUTATION_ENABLED"
51+
4752
# if it is .NET
4853
if [[ "$AWS_EXECUTION_ENV" == *"dotnet"* ]]
4954
then

0 commit comments

Comments
 (0)