Skip to content

Add provisional per-subject evaluation telemetry opt-out tests - #8080

Open
leoromanovsky wants to merge 3 commits into
mainfrom
leoromanovsky/evaluation-telemetry-opt-out
Open

leoromanovsky wants to merge 3 commits into
mainfrom
leoromanovsky/evaluation-telemetry-opt-out

Conversation

@leoromanovsky

@leoromanovsky leoromanovsky commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Applications need flag results while suppressing evaluation telemetry for selected subjects. Add shared regression tests for that contract.
Candidate SDK implementations must pass the applicable local checks before delivery. Released-version CI activation is a separate step.

Changes and Decisions

  • Report coverage under #649: Per-subject evaluation telemetry opt-out.
  • Test enabled and default-disabled behavior through real providers and captured Agent traffic.
  • Check strict boolean activation, subject isolation, and continued targeting with the opt-out attribute.
  • Check evaluation events, metrics, and trace annotations separately. Require unchanged flag results and experiment exposures.
  • Validate responses after setup so an invalid response produces a test failure instead of aborting the scenario.
  • Preserve typed context in the .NET test app. Defer PHP until its OpenFeature test-app foundation is available.
  • Keep manifests provisional until supported SDK versions are known.
HTTP evaluation → OpenFeature provider → SDK → Agent → captured telemetry
                       └─ flag result        └─ unchanged exposure

Companion implementations: Go, Java, Node.js, Python, Ruby, .NET.

Validation

Reran the updated scenarios locally on October 18 against six prepared candidate SDK builds, using Linux ARM64 containers and Agent 7.74.0.

SDK Enabled Default-disabled
Go, Java, Node.js, Python, Ruby 4 passed each 4 passed each
.NET 3 passed 3 passed

All 46 applicable checks passed. .NET excludes the EVP evaluation-event check because it has no producer for that signal.
These runs exercise real provider evaluation, controlled Remote Configuration, and captured Agent traffic. They do not establish released-version compatibility.

Negative control: forced Go activation off in the enabled scenario. Event, metric, and trace checks failed on leaked telemetry; exposures passed.
Restoring activation returned all four checks to green.

@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

CODEOWNERS have been resolved as:

tests/ffe/test_evaluation_telemetry_opt_out.py                          @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/test_evaluation_telemetry_opt_out_contract.py                 @DataDog/feature-flagging-and-experimentation-sdk
tests/ffe/utils/evaluation_telemetry.py                                 @DataDog/feature-flagging-and-experimentation-sdk
manifests/c.yml                                                         @DataDog/system-tests-reviewers
manifests/cpp.yml                                                       @DataDog/system-tests-reviewers
manifests/cpp_httpd.yml                                                 @DataDog/system-tests-reviewers
manifests/cpp_nginx.yml                                                 @DataDog/system-tests-reviewers
manifests/dotnet.yml                                                    @DataDog/system-tests-reviewers
manifests/golang.yml                                                    @DataDog/system-tests-reviewers
manifests/java.yml                                                      @DataDog/system-tests-reviewers
manifests/java_lambda.yml                                               @DataDog/system-tests-reviewers
manifests/java_otel.yml                                                 @DataDog/system-tests-reviewers
manifests/nodejs.yml                                                    @DataDog/system-tests-reviewers
manifests/nodejs_lambda.yml                                             @DataDog/system-tests-reviewers
manifests/nodejs_otel.yml                                               @DataDog/system-tests-reviewers
manifests/php.yml                                                       @DataDog/system-tests-reviewers
manifests/python.yml                                                    @DataDog/system-tests-reviewers
manifests/python_lambda.yml                                             @DataDog/system-tests-reviewers
manifests/python_otel.yml                                               @DataDog/system-tests-reviewers
manifests/ruby.yml                                                      @DataDog/system-tests-reviewers
manifests/ruby_lambda.yml                                               @DataDog/system-tests-reviewers
manifests/rust.yml                                                      @DataDog/system-tests-reviewers
tests/ffe/README.md                                                     @DataDog/feature-flagging-and-experimentation-sdk
utils/_context/_scenarios/__init__.py                                   @DataDog/system-tests-core
utils/_features.py                                                      @DataDog/system-tests-core
utils/build/docker/dotnet/poc.Dockerfile                                @DataDog/system-tests-reviewers
utils/build/docker/dotnet/weblog/Controllers/FeatureFlagEvaluatorController.cs  @DataDog/feature-flagging-and-experimentation-sdk @DataDog/system-tests-core
utils/build/docker/dotnet/weblog/app.csproj                             @DataDog/system-tests-reviewers

@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Tests

✅ All CI checks and tests passed.

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 20ce91e | Docs | View more details | Give us feedback!

Comment thread tests/ffe/README.md Outdated
Comment thread utils/build/docker/php/common/ffe.php Outdated
@leoromanovsky
leoromanovsky marked this pull request as ready for review October 19, 2026 00:36
@leoromanovsky
leoromanovsky requested review from a team as code owners October 19, 2026 00:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T00:44:00.446748Z 20ce91e Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 20ce91eb06

ℹ️ 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".

]
self.cases.extend(shared_cases)

rc.tracer_rc_state.reset().set_config(f"datadog/2/FFE_FLAGS/opt-out-{signal}/config", fixture).apply()

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 Keep fallible operations out of the setup path

When Remote Config application or a worker request raises, this call propagates from each setup_* method and aborts the entire end-to-end scenario before the remaining setups and assertions run. Store setup errors/results and assert them from the matching test_* methods instead, so a failed candidate implementation is reported as a test failure rather than a scenario crash.

AGENTS.md reference: AGENTS.md:L34-L36

Useful? React with 👍 / 👎.

scenario_groups=[scenario_groups.ffe],
)

feature_flagging_evaluation_telemetry_opt_out = DdTraceEndToEndScenario(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude provisional scenarios from default CI groups

DdTraceEndToEndScenario automatically adds the all, end_to_end, and tracer_release groups, so these two provisional scenarios are selected by ordinary official runs for every tracer. The new manifest declarations do not prevent that work: missing_feature is implemented as xfail, meaning the four setup methods still run, including RC waits and 84 evaluations per scenario. This contradicts the documented separate activation step and adds two full container scenarios even before any SDK is supported; define these scenarios without the default groups or otherwise keep them out of normal CI until activation.

Useful? React with 👍 / 👎.

Comment on lines +156 to +158
for point in metric.get("points", []):
total += float(point["value"] if isinstance(point, dict) else point[1])
assert_count(total, expected_count, flag)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid summing repeated cumulative metric snapshots

For SDKs that export the OpenTelemetry counter with cumulative temporality, the Agent capture can contain the same accumulated value in multiple periodic exports; this scenario explicitly exports every second and spends several more seconds running later setups before shutdown. Summing every captured point and requiring exact equality therefore reports more than three evaluations even when the implementation is correct. The existing metric-count test in tests/ffe/test_flag_eval_metrics.py deliberately accepts total_count >= self.eval_count; this assertion should instead select the final cumulative value or otherwise account for temporality while retaining the zero-count opt-out check.

Useful? React with 👍 / 👎.

This branch has not been deployed

No deployments
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.

1 participant