fix: disable Client Side Stats by default#756
Conversation
datadog_lambda/config.py
Outdated
| ) | ||
|
|
||
| # disable css by default to prevent double counting in lambda | ||
| if "DD_TRACE_COMPUTE_STATS" not in os.environ: |
There was a problem hiding this comment.
Should we ignore this ENV even it's set ? we can generate a warning if we found it's set to true and tell the customer this should always be off?
There was a problem hiding this comment.
The warning is a good idea though I dont think we should block the option completely. If the user sees the warning they can choose whether or not to ignore it. I think @happynancee had the same idea
datadog_lambda/config.py
Outdated
| "DD_TRACE_COMPUTE_STATS" not in os.environ | ||
| and "DD_TRACE_STATS_COMPUTATION_ENABLED" not in os.environ | ||
| ): | ||
| os.environ["DD_TRACE_COMPUTE_STATS"] = "false" |
There was a problem hiding this comment.
Do both DD_TRACE_COMPUTE_STATS and DD_TRACE_STATS_COMPUTATION_ENABLED work in Python? If so, I would consider setting DD_TRACE_STATS_COMPUTATION_ENABLED=false since that's the more standard one across all the tracers.
There was a problem hiding this comment.
Sounds good. Theyre essentially used as aliases in the python tracer.
There was a problem hiding this comment.
Is there any reason we'd want to allow users to enable client-side stats? If not, we should just set this env var always.
There was a problem hiding this comment.
following up on whether we should or should not allow customers to set it.
This actually makes a difference. ENVs or configurations are not created for all environments and platforms. It is a common practice to always turn specific ENVs off in specific environments. This is one of those cases. We literally don't want to grant customers the freedom to choose here... because it doesn't work...
There was a problem hiding this comment.
very good points. I'll just invariably set the env then
What does this PR do?
Disables CSS by default to prevent double counting by the agent.
Testing Guidelines
With css disabled in lambda:
generated by this pipeline
With css enabled in lambda:
Generated by this pipeline
as shown, css is corrected when disabled in lambda and almost doubled when enabled
Motivation
APMSVLS-435
Additional Notes
Types of Changes
Check all that apply