Repository navigation
feat(openfeature): add per-subject evaluation telemetry opt-out - #21047
leoromanovsky wants to merge 8 commits into
Conversation
Codeowners resolved asResolved from the full PR diff against |
Dependency direction analysis
|
🎉 All green!🧪 All tests passed 🔗 Commit SHA: 3d95a4f | Docs | View more details | Give us feedback! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
More details
The telemetry gate uses the final resolved context and keeps suppression state per evaluation, with no reportable defect identified. Runtime behavior remains unverified because the required OpenFeature and test dependencies were unavailable.
🤖 Bits Code Review · Commit 956e6e0
gnufede
left a comment
There was a problem hiding this comment.
Approving to unblock, but please address @KowalskiThomas' comments
|
🤖 Comment from Claude working fully autonomously overnight: [P2] Please add a local system-tests run of the opt-out scenarios to the PR description. No CI job runs those tests against this PR yet. The matching tests exist on the system-tests default branch:
A unit-test pass is not the same evidence. The system tests run the built tracer in a weblog and assert the payloads it sends. Suggested run and receiptFrom a system-tests checkout, with this PR's head loaded into the Python weblog (system-tests ./build.sh python
./run.sh FEATURE_FLAGGING_EVALUATION_TELEMETRY_OPT_OUT
./run.sh FEATURE_FLAGGING_EVALUATION_TELEMETRY_OPT_OUT_DISABLEDThe manifest marks the file Receipt fields that make the run checkable:
The Python weblogs construct |
|
🤖 Comment from Claude working fully autonomously overnight: Reminder: after the release that contains this change, replace the provisional |
FFE reviewer selectionReviewers: @vjfridge, @sameerank Why: Privacy opt-out and event logging rules — The PR adds a per-subject opt-out for evaluation telemetry. Reviewers come from the matched pod. 🤖 Automated selection. Selection detailsInitiative: project / ufc-compliance Why this match: The PR adds a per-subject opt-out for evaluation telemetry. It is off by default and can be turned on with an environment setting or a provider constructor argument. When an evaluation context sets dd_evaluation_telemetry_opt_out=True, the provider stops emitting evaluation EVP events, evaluation metrics and flag span annotations. Flag results and exposure logging stay the same. This matches the project's per-context suppression of evaluation event egress for user opt-out.
Additional review: openfeature-architecture — The provider's evaluation contract changes. Object evaluations that resolve to scalar or null JSON now return the supplied default with Reason.ERROR and TYPE_MISMATCH instead of the raw value, and this has its own fix release note. The provider also adds a new constructor parameter, puts a new internal key in the resolution flag_metadata, and wraps the provider hooks in a per-call gating hook that removes that metadata key before the SDK returns the result. Coverage: @sameerank. Evidence: ddtrace/internal/openfeature/_provider.py, ddtrace/internal/openfeature/_evaluation_telemetry.py The PR author was excluded. Existing reviewers and teams were preserved. Debug or fix a problemWorkflow run · Bits Code session
Evidence and run details✅ Complete — reviewer coverage verified. The workflow checked pending requests or submitted reviews on the evaluated head. Generated asynchronously by the FFE reviewer-routing workflow. Changed paths: Evaluated head: Registry revision: Pinned skill source: Instructions: workflow-injected snapshot (no plugin loaded) Instruction snapshot SHA-256: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b79b4acae
ℹ️ 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 from Codex working with @leoromanovsky: Added the local system-test receipt requested in this comment to the PR description. Both enabled and default-disabled scenarios completed with four XPASS results at tracer commit The release-activation reminder remains a follow-up after the first SDK release containing this feature; it does not require a change in this PR. |
BenchmarksBenchmark execution time: 2026-10-30 22:44:41 Comparing candidate commit 3d95a4f in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 610 metrics, 10 unstable metrics, 1 flaky benchmarks without significant changes.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 52627ff359
ℹ️ 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".
There was a problem hiding this comment.
The new benchmark requires a constructor option absent from the baseline tracer, preventing normal baseline/candidate comparisons. It needs capability-aware provider construction and telemetry expectations.
🤖 Bits Code Review · Commit 795b8ba
Description
Applications need to suppress evaluation telemetry for individual subjects without changing flag results or experiment exposure logging.
Support is disabled by default. Enable it with
DD_FEATURE_FLAGS_EVALUATION_TELEMETRY_PER_SUBJECT_OPT_OUT_ENABLED=trueorDataDogProvider(enable_evaluation_telemetry_opt_out_parameter=True). An explicit constructor value overrides the environment for that instance. Only booleanTruein the context attributedd_evaluation_telemetry_opt_outsuppresses new evaluation events, evaluation metrics, and automatic flag span annotations.The provider captures the final merged context at resolver entry, including contexts returned by before hooks, and isolates decisions across nested and concurrent evaluations. Existing queued telemetry, application hooks, and exposure behavior are preserved. Object evaluations return the supplied default and TYPE_MISMATCH for scalar/null JSON, including async evaluation, so error results retain the telemetry decision. The attribute remains available for targeting and exposure payloads.
Testing
At commit
795b8ba1d003865ee83aff07806135df1f2b2216, the candidate tree passed all 1,310 OpenFeature tests plus four Reno regression tests on Python 3.12 with OpenFeature 0.10.0. All 139 opt-out cases also passed in the repository's older OpenFeature environment. Repository lint checks and Reno lint/report generation passed. The new full-client benchmark covers support disabled, enabled with emission, and enabled with suppression; discovery includes both changed runtime files.Local system-test receipt for both opt-out scenarios
Tested dd-trace-py commit:
795b8ba1d003865ee83aff07806135df1f2b2216.System-tests commit:
b76b165ebaeff5cf4458936cadc8e7259796dde8.Reused the Python 3.12 weblog built with
./build.sh python --weblog-variant python3.12, withbinaries/python-load-from-localpointing to the clean signed tracer checkout through the harness's read-only source mount. The image ID wassha256:6c4d0f7c9cfc57e4aa81e80cf830ef7469ba30309b4b65478c2eaefa9579b8d6.Executed:
Each scenario completed with four XPASS results and no failed assertions. The unchanged manifest's provisional
missing_featureentry explains XPASS. These runs exercise environment activation in a local weblog; constructor activation is covered by unit tests. They are not staging or production evidence and do not establish that PR CI runs these scenarios.Risks
This suppresses only the three evaluation-telemetry signals. Experiment exposures still contain the targeting key and context attributes; local debug logging remains separately controlled. Before-hook returned contexts apply only when resolution is reached: provider NOT_READY/FATAL and later hook failures require the opt-out attribute in the initial context. The final decision travels in result metadata across executor boundaries; custom resolver overrides must preserve that metadata.
Additional Notes
After the first SDK release containing this feature, replace the provisional system-tests manifest entry with that released version. This release-activation follow-up remains outside this PR.