Repository navigation
Conversation
Contributor
Preview links (active after the
|
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? What is the motivation?
Documents the
flagSelectionoption of the Android, React Native, and Unity client SDKs. The option loads only the flags that match a set of tags or key patterns.feature_flags/client/android.md: addsflagSelection(tags, keyPatterns)to Advanced configuration > Global configuration and a Load a subset of flags section, with Kotlin and Java samples.feature_flags/client/reactnative.md: addsflagSelectionto Configure Feature Flags options, a Load a subset of flags section, and a troubleshooting step.feature_flags/client/unity.md: addsflagSelectionto Advanced configuration and a Load a subset of flags section.Each section covers the matching rules, when the selection is fixed, the limits, what happens when the SDK does not send a selection or Datadog ignores it (
DD-Flag-Selection-Ignoredreasons), the log messages and how to make them visible, the proxy requirement for the response header, and theFLAG_NOT_FOUNDresult for flags outside the selection.The sections mirror the browser SDK's Load a subset of flags section and the iOS section in #42043.
Merge readiness
Do not merge until released. Each page has an
X.Y.Zminimum version marked with<!-- TODO: minimum version once released -->. Replace it when the release ships:dd-sdk-android3.17.0, which is expected to include FFL-3459: Support flagSelection on Flags precompute requests dd-sdk-android#4031 (merged, not released).@datadog/mobile-react-nativerelease that includes [FFL-3726] feat: Add flagSelection to the Flags configuration dd-sdk-reactnative#1560 (draft; it needsdd-sdk-android3.17.0).AI assistance
Drafted with an AI coding assistant from the SDK source:
dd-sdk-androidat the DataDog/dd-sdk-android#4031 merge, the DataDog/dd-sdk-reactnative#1560 branch, anddd-sdk-unityat the DataDog/dd-sdk-unity#337 merge. The code samples, limits, and log messages were checked against that source.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
Differences between the SDKs
nullvalue in a list makes the selection malformed. Errors go to Logcat with theDatadogtag and print only afterDatadog.setVerbosity(). The OpenFeatureget<Type>Details()methods andFlagsClient.resolve()returnFLAG_NOT_FOUNDfor flags outside the selection.DdFlags.enable(). The JavaScript layer checks the shape of the selection, and the iOS and Android SDKs apply the limits, read the response header, and cache flags. On iOS, the native errors name the optionFlags.Configuration.flagSelection. Errors print only whenverbosityis set. The selection does not filter a configuration that the app supplies itself, such as withDatadogOfflineOpenFeatureProvider.FlagsConfigurationconstructor (the fields are read-only, so object initializers do not compile). Flags are not cached across launches, so the page has no paragraph about cached flags after a selection change. Errors always go to Unity'sDebuglogger, and the SDK verbosity setting does not filter them. On WebGL, a proxy must also expose the response header through CORS.Open questions
feature_flags/guide/proxy_sdk_traffic.mdis edited in Document flag selection for the iOS SDK #42043, so this PR puts the proxy note on each SDK page and leaves the guide unchanged. The guide's Android and React Native tabs can get the same note after Document flag selection for the iOS SDK #42043 merges. The guide has no Unity tab.developchange reports the ignored reason asredactedin some configurations. If 3.17.0 includes it, the Android reason table may need a row for it.developis 2.0.0.