Skip to content

Add parametric coverage for the Org Propagation Guard (OPG) RFC#6872

Merged
amarziali merged 7 commits into
mainfrom
andrea.marziali/opg
Jun 3, 2026
Merged

Add parametric coverage for the Org Propagation Guard (OPG) RFC#6872
amarziali merged 7 commits into
mainfrom
andrea.marziali/opg

Conversation

@amarziali

Copy link
Copy Markdown
Contributor

Motivation

Adds parametric system-tests coverage for the Org Propagation Guard RFC

The tests relies on a new test-agent that is able to inject a customizable org_propagation_guard field in the info endpoint. Without it, testing this feature is not possible.

Note: the java opentracing controller has been modified here since was not taking into account the baggage correctly. It can be moved in another PR if needed (i.e. the one that will activate java tests).

Changes

  • tests/parametric/test_headers_opm.py (new, 17 tests) — covers injection passthrough/override rules, both Datadog and W3C carrier styles, default-off (no regression), match path, mismatch enforcement, trusted-OPM allowlist, strict mode, and the agent → /info → tracer pipeline.
  • utils/_features.py — adds @features.org_propagation_guard decorator (feature_id 555, owner sdk_capabilities).
  • utils/_context/_scenarios/parametric.py — bumps ddapm-test-agent from v1.42.0 to v1.54.1. v1.54.1 reads ORG_PROP_MARKER env var and surfaces it as org_prop_marker in /info, which is what lets tests configure the tracer's local OPM. Other test-agent pins (used by unrelated scenarios) are intentionally left at their existing versions.
  • utils/build/docker/java/parametric/.../OpenTracingController.java — pre-existing harness limitation: dd-trace-ot drops the W3C baggage entry when converting Contextio.opentracing.SpanContext, so neither extract nor inject sees baggage through the OT API. The patch side-channels the raw inbound baggage header, keyed by trace_id so it survives the extract → make-child-span → inject flow used by dd_make_child_span_and_get_headers. Only affects the parametric Java test client; the dd-java-tracer's actual OPG enforcer correctly preserves ctx.getBaggage().

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

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/parametric/test_headers_opm.py                                    @DataDog/system-tests-core @DataDog/apm-sdk-capabilities
manifests/cpp.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/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
manifests/rust.yml                                                      @DataDog/apm-rust
utils/_features.py                                                      @DataDog/system-tests-core
utils/build/docker/dotnet/parametric/Endpoints/ApmTestApi.cs            @DataDog/apm-dotnet @DataDog/asm-dotnet @DataDog/system-tests-core
utils/build/docker/golang/parametric/datadog.go                         @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/golang/parametric/main.go                            @DataDog/dd-trace-go-guild @DataDog/system-tests-core
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/controller/TraceController.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/java/parametric/src/main/java/com/datadoghq/trace/opentracing/controller/OpenTracingController.java  @DataDog/apm-java @DataDog/asm-java @DataDog/system-tests-core
utils/build/docker/nodejs/parametric/server.js                          @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/php/parametric/server.php                            @DataDog/apm-php @DataDog/system-tests-core
utils/build/docker/python/parametric/apm_test_client/server.py          @DataDog/apm-python @DataDog/asm-python @DataDog/system-tests-core
utils/build/docker/ruby/parametric/server.rb                            @DataDog/ruby-guild @DataDog/asm-ruby @DataDog/system-tests-core
utils/build/docker/rust/parametric/src/datadog/mod.rs                   @DataDog/apm-rust @DataDog/system-tests-core
utils/docker_fixtures/_test_clients/_test_client_parametric.py          @DataDog/system-tests-core

@datadog-datadog-prod-us1

This comment has been minimized.

@amarziali
amarziali marked this pull request as ready for review May 18, 2026 08:19
@amarziali
amarziali requested review from a team as code owners May 18, 2026 08:19

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

Copy link
Copy Markdown

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: 73eae84bef

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/parametric/test_headers_opm.py
Comment thread tests/parametric/test_headers_opm.py Outdated
@amarziali
amarziali force-pushed the andrea.marziali/opg branch from c6a19b8 to a781c60 Compare May 26, 2026 08:15
@amarziali
amarziali requested a review from bwoebi May 26, 2026 14:46
@amarziali
amarziali force-pushed the andrea.marziali/opg branch from 5d09541 to a409148 Compare June 2, 2026 07:03
@amarziali

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: a40914870a

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread utils/docker_fixtures/_test_clients/_test_client_parametric.py Outdated
@amarziali

Copy link
Copy Markdown
Contributor Author

@codex review

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

Copy link
Copy Markdown

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: 20edaa0f49

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/parametric/test_headers_opm.py
Comment thread manifests/php.yml Outdated

@cbeauchesne cbeauchesne left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

AGTM, but can you get a review from someone familiar with test tested feature ?

@amarziali

Copy link
Copy Markdown
Contributor Author

AGTM, but can you get a review from someone familiar with test tested feature ?

@cbeauchesne : @bwoebi and I are the authors of the feature so it would be ok

@amarziali
amarziali force-pushed the andrea.marziali/opg branch from 20edaa0 to aeb5c03 Compare June 3, 2026 15:03
@amarziali
amarziali merged commit dc5a553 into main Jun 3, 2026
442 checks passed
@amarziali
amarziali deleted the andrea.marziali/opg branch June 3, 2026 15:40
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.

5 participants