Conversation
|
|
4871555 to
0cf62ff
Compare
This comment has been minimized.
This comment has been minimized.
| assert headers["datadog-obfuscation-version"] == "1", ( | ||
| f"Expected obfuscation version '1', got '{headers['datadog-obfuscation-version']}'" |
There was a problem hiding this comment.
I think you should check for >=1 to make sure the test still passes if a tracer updates to a v2 someday
0cf62ff to
714e99a
Compare
|
|
||
| assert obfuscation_header_found, "Datadog-Obfuscation-Version header not found on any stats payload" | ||
|
|
||
| assert len(sql_stats) > 0, "Expected at least one SQL stats entry" |
There was a problem hiding this comment.
Out of curiosity, is there something that can cause len(sql_stats) to not be 4 (1,2,admin,test), or is it just to make it easier to add more values to test_user_ids ?
There was a problem hiding this comment.
For some reason stats appear to be sent twice by dd-trace-py so len(sql_stats) == 8 but I feel like other tracers might send them only once which would also be correct for this test. I could however assert that each bucket has 4 stats entry if you want
There was a problem hiding this comment.
Ok I just tried it again and what I just said was something I misremembered from when I started working on this. it is indeed == 4 so I just change it to that instead
| "DD_TRACE_TRACER_METRICS_ENABLED": "true", # java | ||
| }, | ||
| agent_env={ | ||
| "DD_APM_SQL_OBFUSCATION_MODE": "normalize_only", |
There was a problem hiding this comment.
I don't see anything about disabling the obfuscation in the spec is it done by setting the obfuscation version to 0 (if not maybe we need a scenario for the missing/version 0 case)
There was a problem hiding this comment.
It's not a setting from the CSS spec but to avoid breaking changes in the obfuscation behavior when switching from agent obfuscation to client obfuscation I decided that following as much of the config as possible would be preferable.
https://github.com/DataDog/datadog-agent/blob/main/pkg/config/config_template.yaml#L1633
btw I don't get the fail in test_the_tests because the new scenario
TRACE_STATS_COMPUTATION_OBFUSCATION_DISABLEDhas agent_env variables that the existingTRACE_STATS_COMPUTATIONdoesn't so they're not equivalent.Motivation
/statsChanges
Workflow
🚀 Once your PR is reviewed and the CI green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified ? I have the approval from R&P teambuild-XXX-imagelabel is present