Skip to content

[APMSVLS-433] Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default#1186

Open
eunskin wants to merge 1 commit intoDataDog:mainfrom
eunskin:disable-client-compute-stats
Open

[APMSVLS-433] Disable DD_TRACE_STATS_COMPUTATION_ENABLED by default#1186
eunskin wants to merge 1 commit intoDataDog:mainfrom
eunskin:disable-client-compute-stats

Conversation

@eunskin
Copy link
Copy Markdown

@eunskin eunskin commented Apr 15, 2026

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

  • 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

Copilot AI review requested due to automatic review settings April 15, 2026 07:14
@eunskin eunskin requested a review from a team as a code owner April 15, 2026 07:14
@eunskin eunskin requested a review from jchrostek-dd April 15, 2026 07:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_ENABLED to false by default via shell parameter expansion.
  • Adds a debug log line to print the resolved DD_TRACE_STATS_COMPUTATION_ENABLED value.

Comment thread scripts/datadog_wrapper
Comment on lines +47 to +48
# 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}"
Copy link

Copilot AI Apr 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@duncanista
Copy link
Copy Markdown
Contributor

duncanista commented Apr 15, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants