Skip to content

add test for network.client.ip tag#6707

Open
smola wants to merge 1 commit intomainfrom
smola/network-client-ip
Open

add test for network.client.ip tag#6707
smola wants to merge 1 commit intomainfrom
smola/network-client-ip

Conversation

@smola
Copy link
Copy Markdown
Member

@smola smola commented Apr 9, 2026

Motivation

APPSEC-62223

Changes

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?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

CODEOWNERS have been resolved as:

manifests/java.yml                                                      @DataDog/asm-java @DataDog/apm-java
manifests/nodejs.yml                                                    @DataDog/dd-trace-js
manifests/php.yml                                                       @DataDog/apm-php @DataDog/asm-php
manifests/python.yml                                                    @DataDog/apm-python @DataDog/asm-python
manifests/ruby.yml                                                      @DataDog/ruby-guild @DataDog/asm-ruby
tests/test_standard_tags.py                                             @DataDog/system-tests-core

@smola smola force-pushed the smola/network-client-ip branch 4 times, most recently from 678bc2d to 7615cdb Compare April 10, 2026 09:41
@datadog-official
Copy link
Copy Markdown

datadog-official bot commented Apr 10, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

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

@smola smola force-pushed the smola/network-client-ip branch from 7615cdb to c64707f Compare April 10, 2026 10:07
@smola smola marked this pull request as ready for review April 10, 2026 10:08
@smola smola requested review from a team as code owners April 10, 2026 10:08
@smola smola requested review from P403n1x87, avara1986, claponcet, jandro996 and ygree and removed request for a team April 10, 2026 10:08
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c64707fae2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +210 to +212
@scenarios.go_proxies_default
@scenarios.default
class Test_StandardTagsNetworkClientIp:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Gate network client IP tests by supported tracer versions

Adding this class enables it by default in DEFAULT and GO_PROXIES_DEFAULT for any library/version that lacks an explicit manifest rule, because unspecified tests are treated as enabled (see docs/edit/manifest.md). That creates a regression for older tracer versions that still do not emit http.client_ip/network.client.ip (the existing Test_StandardTagsClientIp is version-gated per language, e.g. in manifests/nodejs.yml and manifests/java.yml), so test_network_client_ip_with_attack can start failing in release-version runs. Please add class/method manifest gating for this new class with the same support floor as client-ip tagging.

Useful? React with 👍 / 👎.

assert network_client_ip != self.PUBLIC_IP
# http.client_ip resolves proxy headers, while network.client.ip does not, so both should be different here.
http_client_ip = meta.get("http.client_ip")
assert http_client_ip
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.

also add http_client_ip == self.PUBLIC_IP
the rest looks good to me

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I was intentionally not doing it since it's covered by the http.client_ip tests, but it doesn't hurt. I'll do it.

@smola smola force-pushed the smola/network-client-ip branch from c64707f to 04fab3f Compare April 10, 2026 11:54
Copy link
Copy Markdown
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 an approval from someone familiar with the feature

@smola smola force-pushed the smola/network-client-ip branch from 04fab3f to 0fcf185 Compare April 10, 2026 13:17
@smola smola force-pushed the smola/network-client-ip branch from 0fcf185 to 4d60a43 Compare April 10, 2026 13:19
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.

4 participants