Repository navigation
Conversation
Add a Load a subset of flags section to the JavaScript client page and a proxy note for the DD-Flag-Selection-Ignored header. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Preview links (active after the
|
Nest the Load a subset of flags section under Initialize the provider, since flagSelection is set when the provider is created. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the OpenFeature.getClient() call to the Evaluate flags outside the selection example, since client is otherwise first defined in the later Get a client section. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Set the minimum @datadog/openfeature-browser version to 2.2.0 and note that Datadog returns the full configuration without DD-Flag-Selection-Ignored when flag selection is not enabled for the organization. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Flag selection is rolling out globally, so the no-header case no longer refers to per-organization enablement. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Remove the no-header case and state that flags outside the selection are not loaded. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Lead with the risk that team tags change with ownership, and render it as a WARNING callout. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
List each limit on its own line so the 31-value limit is not read as a combined total. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Matches MAX_RULES_URL_BYTES and the too_many_values console error in @datadog/openfeature-browser 2.2.0. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
State that too_many_values also covers selections too long for one request, document that empty selections load the full configuration silently, and scope the Access-Control-Expose-Headers requirement to cross-origin proxies. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the two console error templates the browser SDK logs when it does not send a flag selection or when Datadog ignores it. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
State in one sentence that flagSelection does not filter configuration supplied with initialFlagsConfiguration. Environment: Datadog workspace Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Created DOCS-16170 for review |
joepeeples
left a comment
There was a problem hiding this comment.
Thanks for this new content, @mark-caii! I flagged a few possible edits, and one overall structural suggestion: Consider moving Load a subset of flags under Configure browser provider options, as an H3. Where it sits now, it interrupts the basic setup flow with an optional, advanced feature.
Feel free to ping directly when ready for a quick re-review, thanks!
|
On the structural suggestion in the review: moved Load a subset of flags under Configure browser provider options as an H3, after Set a timeout and retries for flag configuration requests, in d8e1dfc. The |
What does this PR do? What is the motivation?
Ticket: FFL-3457
Documents the
flagSelectionoption of the browser SDK (@datadog/openfeature-browser), which loads only the flags that match a set of tags or key patterns.feature_flags/client/javascript.md: addsflagSelectionto the provider options table and a Load a subset of flags section covering matching rules (exact, case-sensitive tags; whole-key globs where only*is special; tags OR key patterns), limits (31 values per list, 200 UTF-8 bytes per value), what happens when a selection is dropped by the SDK or ignored by Datadog (DD-Flag-Selection-Ignoredreasons),FLAG_NOT_FOUNDfor flags outside the selection,initialFlagsConfigurationnot being filtered, andfetchRulesConfiguration()support.feature_flags/guide/proxy_sdk_traffic.md: the Browser tab notes that a proxy must pass throughDD-Flag-Selection-Ignoredand expose it withAccess-Control-Expose-Headers.Merge readiness
The section names
@datadog/openfeature-browser2.2.0, the first release that includesflagSelection, as the minimum version.AI assistance
Drafted with Claude Code from the SDK README and source; reviewed against the SDK behavior.
For Datadog employees:
<name>/<description>convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR./reviewto run an automated check that catches common issues before a Documentation team member reviews your PR.Additional notes
Other client SDK pages and the API reference are not part of this PR.