[APMSVLS-433] Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default#1186
[APMSVLS-433] Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default#1186eunskin wants to merge 1 commit intoDataDog:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Lambda scripts/datadog_wrapper to disable client-side trace stats computation by default (while still allowing users to explicitly enable it), addressing the recent change where Java enables client-side stats by default.
Changes:
- Sets
DD_TRACE_STATS_COMPUTATION_ENABLEDtofalseby default via shell parameter expansion. - Adds a debug log line to print the resolved
DD_TRACE_STATS_COMPUTATION_ENABLEDvalue.
| # Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default for Java and .NET runtimes | ||
| export DD_TRACE_STATS_COMPUTATION_ENABLED="${DD_TRACE_STATS_COMPUTATION_ENABLED:-false}" |
There was a problem hiding this comment.
The comment says this default is for Java and .NET runtimes, but the export is applied unconditionally (i.e., for any runtime that uses this wrapper). Either update the comment to reflect that it’s set globally, or move the export into the Java/.NET runtime branches so the behavior matches the comment.
|
Description is confusing, we mention needing it globally, but we are specifically testing only in Java and .NET. Also mentions that we might need it in the future in .NET, what about other runtimes? Essentially, whoever uses this wrapper, it will disable it, so anyone using it for ASM in any other runtime would get affected by this |
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 1454b861409ff49478c25cc5ece68efb46374add · DataDog/datadog-lambda-extension 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
DD_TRACE_STATS_COMPUTATION_ENABLEDnot configured in AWS UItracerMetricsEnabled=falsein tracer debug logsDD_TRACE_STATS_COMPUTATION_ENABLED=trueconfigured in AWS UItracerMetricsEnabled=truein tracer debug logs2. .NET lambda function e2e testing app
DD_TRACE_STATS_COMPUTATION_ENABLEDnot configured in AWS UI"stats_computation_enabled": falsein tracer debug logsDD_TRACE_STATS_COMPUTATION_ENABLED=trueconfigured in AWS UI"stats_computation_enabled": truein tracer debug logs