Skip to content

Commit 60484cf

Browse files
committed
disable css invariably
1 parent 04ae6c7 commit 60484cf

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

datadog_lambda/config.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,12 @@ def _reset(self):
141141
"enabled" if config.fips_mode_enabled else "not enabled",
142142
)
143143

144-
# disable css by default to prevent double counting in lambda
145-
if (
146-
"DD_TRACE_COMPUTE_STATS" not in os.environ
147-
and "DD_TRACE_STATS_COMPUTATION_ENABLED" not in os.environ
148-
):
149-
os.environ["DD_TRACE_COMPUTE_STATS"] = "false"
150-
else:
151-
logger.warning(
152-
"Detected DD_TRACE_COMPUTE_STATS and/or DD_TRACE_STATS_COMPUTATION_ENABLED. \
153-
These envs should be disabled to avoid double counting Client Side Stats"
154-
)
144+
# disable css to prevent double counting in lambda
145+
os.environ["DD_TRACE_STATS_COMPUTATION_ENABLED"] = "false"
146+
147+
# unset css aliases to ensure it is disabled
148+
if "DD_TRACE_COMPUTE_STATS" in os.environ:
149+
del os.environ["DD_TRACE_COMPUTE_STATS"]
155150

156151
if (
157152
"DD_INSTRUMENTATION_TELEMETRY_ENABLED" not in os.environ

0 commit comments

Comments
 (0)