Skip to content

FFL-3355: Add independent native flag tracking operations - #4012

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
developfrom
sameerank/FFL-3355/granular-tracking-bridge
Oct 23, 2026
Merged

gh-worker-dd-mergequeue-cf854d[bot] merged 8 commits into
developfrom
sameerank/FFL-3355/granular-tracking-bridge

Conversation

@sameerank

@sameerank sameerank commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Add independent native exposure and evaluation tracking operations through _FlagsInternalProxy (FFL-3355).

  • Introduce trackFlagExposure and trackFlagEvaluationEvent without fetching or replacing configuration.
  • Reuse the existing native processors and feature settings, preserving the storage/upload and consent pipeline.
  • Preserve combined trackFlagSnapshotEvaluation behavior, including RUM integration.
  • Support runtime defaults and errors without an assignment, omit assignment metadata for errors, and sanitize unrecognized OpenFeature error codes to GENERAL.
  • Update both API snapshots and add focused bridge regression tests.

Motivation

React Native OpenFeature hooks must select exposure logging, evaluation logging, and RUM tracking independently. The combined bridge operation cannot provide that selection without unwanted or duplicate tracking.

This PR is a prerequisite for DataDog/dd-sdk-reactnative#1507, which uses these APIs for independently selectable OpenFeature tracking hooks. The RN PR must update its Android SDK dependency to a release containing these changes before merging/releasing.

Additional Notes

  • All 438 Flags JVM unit tests pass, including all 22 FlagsTrackingBridgeTest cases for independent selection, preserved combined behavior, defaults/errors, doLog, all four exposure/evaluation configuration combinations, and no-op clients. Ktlint and detekt also pass.
  • Android end-to-end upload verification remains pending.
  • CI tests, static analysis (including CodeQL), and generated-file checks passed for b14b48a4b. devflow/mergegate remains pending.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@datadog-official

datadog-official Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 97.22%
• Overall Coverage: 71.78% (+0.01%)

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

@sameerank
sameerank marked this pull request as ready for review October 21, 2026 09:30
@sameerank
sameerank requested review from a team as code owners October 21, 2026 09:30
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 21, 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-23T06:22:30.577741Z 6cca780 New commits
ℹ️ 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.

@datadog-official datadog-official 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.

Bits Code Review: PASS

More details

The independent tracking operations preserve configuration gates and existing event-processing paths, while combined tracking retains its RUM behavior. No actionable correctness issues were identified.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit b14b48a

leoromanovsky
leoromanovsky previously approved these changes Oct 21, 2026

@Test
fun `M do nothing W independent hooks called {fallback client}`() {
// Given

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.

looks like tests in this class misses verification block

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The fallback-client test previously checked for no exceptions implicitly, since any exception would fail the test.

Commit 11ebea0 makes that expectation explicit with assertDoesNotThrow. It also adds explicit verifyNoInteractions assertions to the skipped-tracking tests, which previously relied on the shared @AfterEach verification.

0xnm
0xnm previously approved these changes Oct 22, 2026
@sameerank
sameerank dismissed stale reviews from 0xnm and leoromanovsky via 11ebea0 October 22, 2026 14:55
Merge current develop, regenerate the Flags API snapshots, and cover
telemetry opt-out for independent tracking hooks.

Ref: FFL-3355

@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: 705ac1aadd

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

Add the standard Mockito strictness annotation and name the exercised tracking methods explicitly.

Ref: FFL-3355

@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: e899563bc1

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

Add parentheses to both methods in the telemetry opt-out test name.

Ref: FFL-3355
Test global and per-subject tracking opt-out through the RN proxy. Share the policy check, extract allowed error codes, and clarify tracking documentation and test naming.

Ref: FFL-3355
Add an independent RUM tracking bridge that honors the native client's telemetry policy and RUM integration setting. Cover opt-out and fallback behavior and update API snapshots.

Ref: FFL-3355
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit fed7198 into develop Oct 23, 2026
28 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the sameerank/FFL-3355/granular-tracking-bridge branch October 23, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants