Repository navigation
Conversation
OpenFeature Browser Provider Bundle SizesMeasured from the Vite production output after installing packed Both scenarios initialize an OpenFeature provider, evaluate a boolean flag, change context, and evaluate again. Telemetry is disabled for DatadogProvider; no tracking hooks are registered for DatadogCoreProvider. DatadogProvider fetches precomputed assignments for each context; DatadogCoreProvider receives rules from fetchRulesConfiguration once and evaluates locally. Sizes include OpenFeature and the same small scenario harness. Configuration responses are supplied by Playwright and are not bundled. These are complete scenario JS sizes, not configuration payload sizes or isolated provider/Protobuf costs; the difference between rows is not a decoder-only delta.
Dependency checks passed: no Protobuf markers in default/precomputed scenarios; markers present in rules-based scenarios. OpenFeature Browser Tracking Hook Bundle SizesSynthetic entrypoints import and call tracking hook factories from the packed
OpenFeature Node Server Bundle SizesIndependent Webpack production builds of the installed core and Node SDK tarballs, targeting Node 18 with ESM (
Adding SSR helpers to the provider adds 83.4 KiB raw / 23.7 KiB gzip in this build. This includes fetching, parsing, and serialization, not just the decoder. SSR helpers fetch rules for the browser, not for configuring that provider (which uses its existing JSON API). Adding precomputation to the provider adds 21.2 KiB raw / 7.0 KiB gzip in this build. Both precompute scenarios import precomputeConfiguration from /rules-based and receive already-parsed rules from the test harness; they do not fetch, parse, or serialize configuration. These are bundler sizes, not npm install sizes, unbundled Node require/import costs, payload sizes, or latency. Gzip compares compressed artifacts. Deltas compare scenarios in this build, not changes against the base branch. The browser scenarios include OpenFeature and a different harness, so their sizes are not directly comparable. Dependency checks passed: no Protobuf runtime or generated schema modules in the provider-only, precompute, or precomputed-fetch bundles; present in both rules-fetch SSR bundles (checked using Webpack module statistics). This report shows current PR artifact sizes only; it does not compare against the base branch. |
…lemetry Allow dependency evaluation collection through the shared tracking helper, preserve caller-owned caches on shutdown, and cover mixed configuration and cache ownership behavior.
df3af46 to
c2f24b0
Compare
FFE reviewer selection✅ 🤖 Automated reviewer routing, requested by the PR author. Review coverage is not approval. Initiative: Dynamic clients, portable configuration and offline startup ( Additional review area: OpenFeature architecture
Existing review requests were preserved. To change routing, correct the PR description or add a reviewer manually. Routing details
|
|
Merging latest main in and resolving conflicts; then reviewing. |
Merge main at 97f730b. Preserve the Node opt-out policy documentation and regenerate declarations.
Compare Date-valued contexts without record aliases, preserve malformed-flag quarantine across snapshot copies, and contain cache admission failures per exposure. Clarify tracking and cache contracts and strengthen regression coverage.
Retain normalized consent and lenient split features across snapshot copies. Return saved terminal flag errors, avoid exception-based Date checks for foreign records, and add regression coverage.
|
🤖 Comment from Codex working with @typotter: Heads up: consider a dedicated offline-initialization system-test harness For the planned system-test follow-up, could we add a small Node harness that loads a local server-rules fixture before registering Suggested harness and assertions
The existing standalone helper runner offers a fresh-process starting point. These proposed assertions are additional provider coverage. They have not been executed as system tests in this review. This fits the follow-up already listed in the rollout plan; it is a harness suggestion rather than a request to add tracer exports here. |
|
Comment from Codex working with @sameerank: We plan to add the dedicated offline-provider system-test harness as a separate follow-up. The PR's "Rollout after this PR" section now makes that explicit. The harness will test the built Node package without waiting for tracer exports. We will then reuse those scenarios through |
|
Started drafting the harness here DataDog/system-tests#8604 and verified by running tests locally |
Motivation
Support offline initialization and dynamic, per-request flag evaluation in Node from a portable rules configuration. A valid local snapshot should be usable on the first invocation without a configuration request or
PROVIDER_NOT_READY.This is the provider building block. Customer-facing
dd-traceexports, tracking factories, and package releases are follow-up work.Changes
DatadogCoreProvider(configuration, options?)to the Node/rules-basedentry point. It supports synchronous OpenFeature registration, evaluates each invocation's context locally, and does not start fetching, polling, or uploading.setConfiguration()emits a configuration-change event after replacement;getConfiguration()returns a detached copy. Mixed inputs use their rules, not context-bound precomputed assignments.createExposureTracking()to/rules-based: itsproviderOptionsshare deduplication and dependency state,createHook(sink)creates an explicitly registered hook, andclear()resets exposure state. Constructing the helper or provider installs no hooks or uploaders. Preserve the existing internal exposure-channel integration. Preserve deduplication, failed-hook handling, consent metadata, and the current Node experimentation opt-out modes.There is no implicit expiry or refresh ordering policy. Applications own freshness, retries, and storage. Server-distributed rules must stay on the server. Evaluation telemetry opt-out, upload, and writer cleanup remain the tracer integration's responsibility.
Test instructions
git diff --check: passed.1.15.0/ core1.3.0), and with repository versions (1.22.0/ core1.11.0). OpenFeature-dependent cases are skipped when the SDK is absent. Type checks cover classic, Node16, and NodeNext resolution, including a typed exposure sink with Node 18 declarations.The committed package-install tests also run in CI via
yarn test:node-installandyarn test:node-install:with-of.Rollout after this PR
@datadog/flagging-corechanges first, then@datadog/openfeature-node-serverwith an exact core dependency pin. This PR does not change versions or publish packages.dd-trace-jsto consume that release and expose the provider and optional tracking hooks. Reuse its existing exposure and evaluation writers, separate tracking setup from configuration-source startup, and define hook/writer lifecycle ownership. Reuse the offline-provider harness scenarios through the tracer integration.dd-trace-jsand activate gated building-block tests once the required exports are available.Checklist