Repository navigation
Conversation
4 tasks
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 4 Pipeline jobs failed
ℹ️ InfoNo other issues found (see more)🧪 All tests passed Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: 8d71eed | Docs | View more details | Give us feedback! |
This was referenced Oct 21, 2026
Route independent RUM hooks through the selected native Flags client and preserve telemetry opt-out. Warn once when core tracking helpers are unavailable, with regression coverage and updated usage guidance. Ref: FFL-3355
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Add independent native-backed OpenFeature tracking hooks for
DatadogCoreProvider(FFL-3355):createDatadogExposureLoggingHook,createDatadogEvaluationLoggingHook, andcreateDatadogRumTrackingHook.composeDatadogTrackingHookswith explicit initialization/shutdown, aligned with the browser hook API.Hooks submit asynchronously without JS batching. Shutdown disables the hooks but does not own or stop the shared native SDK. Site, consent, storage, aggregation, and upload remain native SDK responsibilities.
Motivation
Rules-based JS evaluation needs independently selectable tracking without triggering every native tracking operation or maintaining a second JS telemetry pipeline.
Additional Notes
Native dependencies and merge blockers
This draft depends on:
The checked-in native dependency pins still reference releases without these APIs (iOS 3.16.1 and Android 3.15.0). Update them to releases containing the native changes before merging/releasing, and verify matching-version compatibility between the core and OpenFeature RN packages. An unmodified checkout is not expected to build the new bridge against the currently pinned native releases.
Validation
Exploratory evaluation benchmarks (2026-10-22)
Rerun after the RUM hook moved to the named native Flags client via
trackRumEvaluation. Measured on an iPhone 17 Pro / iOS 26.0 simulator with RN 0.76.9, Hermes, Fabric, minified production JS, and a freshly rebuilt native Debug app. The installed executable and native debug-library hashes matched the rebuilt artifacts and were identical across all three fresh-process runs. These are local exploratory measurements, not a benchmark or CI performance gate included in this PR.Each run used the same boolean assignment and context, granted consent, and local-only intake endpoints. Each workload used eight warm-up rounds and 40 measured rounds with rotating scenario order. No native builds or Android emulator ran during measurement. Each run fetched its precomputed fixture exactly once and produced local exposure, evaluation, and RUM intake requests; those request counts do not establish per-scenario delivery.
Values below are per-run medians in microseconds per evaluation, including baseline evaluation cost, for bursts of 100 reads:
Relative to no hooks, the paired median added burst cost was 72.7-75.6 us for exposure/evaluation and 99.3-101.1 us for all three hooks. RUM-only total burst medians were 75.5-77.3 us. With all hooks, the core-provider path took 4.3-4.4 times the regular provider's time in bursts.
For isolated reads after a 100 ms pause, per-run medians were:
That is 2.5-2.8 times within each run. Simulator scheduling strongly affects isolated reads; compare paths within a run. These replace the earlier exploratory numbers, but are not a controlled before/after measurement of the RUM change because the older native binary's optimization level was not verified.
The regular
DatadogOpenFeatureProviderreads cached, precomputed assignments and submits one asynchronous combined tracking call.DatadogCoreProviderevaluates rules locally and, with all hooks enabled, prepares payloads and submits three separate tracking calls. Both tracking-enabled paths had exposure, evaluation, and RUM enabled. This comparison includes differences in evaluation, metadata preparation, and hook execution; it does not isolate bridge overhead or compare JS rules evaluation with native rules evaluation.Timing ends when the synchronous evaluation returns. Initialization/fetching, hook registration, and waiting for native completion, storage, or upload are excluded. Burst percentiles describe batch averages, not individual-call tail latency. Repeated flag/subject reads exercise deduplication and aggregation, not unique-event throughput. These are native Debug simulator measurements, not native Release measurements. Android performance, physical-device Release performance, and frame impact remain unmeasured. These results alone do not establish a need for JS batching.
Review checklist (to be filled by reviewers)