Skip to content

Add css obfuscation test [APMSP-2764]#6648

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 21 commits into
mainfrom
oscarld/add-css-obfuscation-test
Jun 12, 2026
Merged

Add css obfuscation test [APMSP-2764]#6648
gh-worker-dd-mergequeue-cf854d[bot] merged 21 commits into
mainfrom
oscarld/add-css-obfuscation-test

Conversation

@Eldolfin

@Eldolfin Eldolfin commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

TODO

  • add a missing obfuscation_version test
  • add a obfuscation_version = 0 test
  • enable tests in manifest once enabled in dd-trace-py

Motivation

  • Test that libraries obfuscate spans before sending them to /stats

Changes

  • new tests

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@Eldolfin Eldolfin changed the title Oscarld/add css obfuscation test [APMSP-2764] Add css obfuscation test [APMSP-2764] Mar 31, 2026
@github-actions

github-actions Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

.github/workflows/run-end-to-end.yml                                    @DataDog/system-tests-core
manifests/cpp.yml                                                       @DataDog/dd-trace-cpp
manifests/cpp_httpd.yml                                                 @DataDog/dd-trace-cpp
manifests/cpp_nginx.yml                                                 @DataDog/dd-trace-cpp
manifests/dotnet.yml                                                    @DataDog/apm-dotnet @DataDog/asm-dotnet
manifests/golang.yml                                                    @DataDog/dd-trace-go-guild
manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/java_otel.yml                                                 @DataDog/system-tests-core
manifests/nodejs_otel.yml                                               @DataDog/system-tests-core
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/python_lambda.yml                                             @DataDog/apm-python @DataDog/asm-python
manifests/python_otel.yml                                               @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
tests/stats/test_stats.py                                               @DataDog/system-tests-core
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core
utils/_context/_scenarios/endtoend.py                                   @DataDog/system-tests-core
utils/_context/containers.py                                            @DataDog/system-tests-core
utils/proxy/mocked_response.py                                          @DataDog/system-tests-core

@Eldolfin Eldolfin force-pushed the oscarld/add-css-obfuscation-test branch from 4871555 to 0cf62ff Compare March 31, 2026 11:09
@datadog-datadog-prod-us1

datadog-datadog-prod-us1 Bot commented Mar 31, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 45e38cc | Docs | Datadog PR Page | Give us feedback!

Comment thread utils/build/docker/python/flask/app.py
Comment thread tests/stats/test_stats.py Outdated
@Eldolfin Eldolfin force-pushed the oscarld/add-css-obfuscation-test branch from 0cf62ff to 714e99a Compare April 2, 2026 11:32
Comment thread tests/stats/test_stats.py Outdated
Comment thread tests/stats/test_stats.py Outdated
"DD_TRACE_TRACER_METRICS_ENABLED": "true", # java
},
agent_env={
"DD_APM_SQL_OBFUSCATION_MODE": "normalize_only",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry I wasn't really clear what I meant was:

  1. Agent obfuscation config doesn't seem to be covered in the current spec, maybe it should be updated (CC @ichinaski)
  2. Does this scenario implies Agent version 0 or missing if not maybe we want to run a scenario for this case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. Yes, I think this is a shortcoming of the spec currently, because with CSS disabled the agent would have followed the obfuscation config.
  2. No it's exactly like TRACE_STATS_COMPUTATION but with config such as obfuscation makes the 4 spans different so that they end up in different buckets so it's visible. I'll add a similar test with a missing version 👍🏽

@VianneyRuhlmann VianneyRuhlmann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, the idea for a version 0 scenario can be addressed in a follow-up PR if needed

@Eldolfin Eldolfin force-pushed the oscarld/add-css-obfuscation-test branch from 1c3b465 to 38567bc Compare June 2, 2026 16:25
@Eldolfin Eldolfin changed the base branch from main to oscarld/fix-test-minimal-number-of-scenarios-check-agent-env June 4, 2026 11:25
Base automatically changed from oscarld/fix-test-minimal-number-of-scenarios-check-agent-env to main June 4, 2026 12:52
@Eldolfin Eldolfin force-pushed the oscarld/add-css-obfuscation-test branch from 9d3f272 to 1fcdc3a Compare June 4, 2026 13:03
@Eldolfin Eldolfin requested review from a team as code owners June 11, 2026 10:04
@Eldolfin Eldolfin requested review from Yun-Kim, daniel-romano-DD, gnufede, manuel-alvarez-alvarez and zacharycmontoya and removed request for a team June 11, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants