Skip to content

[java@alejandro.gonzalez/RFC-1081-proxy-2]Enable Java v2 tests for proxy inferred spans#6441

Open
jandro996 wants to merge 19 commits intomainfrom
alejandro.gonzalez/rfc-1081-proxy
Open

[java@alejandro.gonzalez/RFC-1081-proxy-2]Enable Java v2 tests for proxy inferred spans#6441
jandro996 wants to merge 19 commits intomainfrom
alejandro.gonzalez/rfc-1081-proxy

Conversation

@jandro996
Copy link
Member

@jandro996 jandro996 commented Mar 5, 2026

Changes

Enabled test and modify them to suits java special behaviour:

  • Removed Java-specific skips for http.status_code and error — fixed in tracer
  • Removed validation of aws_user tag (maps to x-dd-proxy-user header) — PII concern, not included in the spec
  • full_trace=True is required in get_appsec_events loop

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?

jandro996 and others added 4 commits March 5, 2026 11:11
- Add full_trace=True to all v2 tests to search across all traces
  (aws.apigateway span is a root span in a separate trace)
- Skip http.status_code validation for Java (span created before request completes)
- Skip error field validation for Java (span created before request completes)
- Skip optional tags validation for Java (not yet implemented, only mandatory tags required)
- Enable v2 tests for Java in manifests/java.yml

All 9 inferred proxy tests now pass (3 v1 + 6 v2).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove Java skip from optional_tags_validator_factory - optional tags
are now implemented in Java tracer:
- account_id (from x-dd-proxy-account-id)
- apiid (from x-dd-proxy-api-id)
- region (from x-dd-proxy-region)
- dd_resource_key (computed ARN)

Note: aws_user validation removed per RFC (PII concerns - not implemented)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

CODEOWNERS have been resolved as:

manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
tests/appsec/test_inferred_spans.py                                     @DataDog/asm-libraries @DataDog/system-tests-core
tests/integrations/test_inferred_proxy.py                               @DataDog/system-tests-core
utils/build/docker/java/akka-http/src/main/scala/com/datadoghq/akka_http/MainRoutes.scala  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/jersey-grizzly2/src/main/java/com/datadoghq/jersey/MyResource.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/play/app/controllers/AppSecController.scala     @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/play/conf/routes                                @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/ratpack/src/main/java/com/datadoghq/ratpack/Main.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/resteasy-netty3/src/main/java/com/datadoghq/resteasy/MyResource.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/vertx3/src/main/java/com/datadoghq/vertx3/Main.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/vertx4/src/main/java/com/datadoghq/vertx4/Main.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core

@jandro996 jandro996 marked this pull request as ready for review March 5, 2026 14:42
@jandro996 jandro996 requested review from a team as code owners March 5, 2026 14:42
@jandro996 jandro996 changed the title Enable Java v2 tests for inferred spans for proxy Enable Java v2 tests for proxy inferred spans Mar 5, 2026
  Remove the Java-specific branches that skipped validation of http.status_code
  and error tags on inferred proxy spans. These tags are now correctly propagated
  from the service-entry span to the inferred proxy span.
@jandro996 jandro996 changed the title Enable Java v2 tests for proxy inferred spans [java@alejandro.gonzalez/RFC-1081-proxy-2]Enable Java v2 tests for proxy inferred spans Mar 6, 2026
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Mar 6, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ae0d169 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Copy link
Collaborator

@nccatoni nccatoni left a comment

Choose a reason for hiding this comment

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

LGTM (for @DataDog/system-tests-core) but you should get a review from someone familiar with the feature.

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.

3 participants