docs(feature-flags): add Flutter client integration#37811
Conversation
e486252 to
eac0305
Compare
96a2b98 to
7f5b485
Compare
|
|
/review |
There was a problem hiding this comment.
🤖 Automated review by Claude. AI-generated; verify before acting.
Two suggestions on consistency between the renamed page and the cross-reference list. Nothing blocking.
Reviewed 7f5b485b31593e1b91513355c7f4506a48ea98b4 — workflow run
|
|
||
| Use this setup when your Flutter app already initializes `datadog_flutter_plugin`. Add `DatadogFlagsPluginConfiguration` to your existing `DatadogConfiguration` before initializing the Datadog SDK. The plugin derives the client token, environment, site, service, version, and RUM application ID from the Flutter SDK configuration. To create a client token, see [Client tokens][1]. | ||
|
|
||
| {{< site-region region="gov,gov2" >}}<div class="alert alert-danger">Flutter Feature Flags are not supported for the selected <a href="/getting_started/site">Datadog site</a> ({{< region-param key="dd_site_name" >}}).</div>{{< /site-region >}} |
There was a problem hiding this comment.
Suggestion: The page now covers both Dart and Flutter, but this warning says "Flutter Feature Flags" while the matching warning under ## Standalone Dart setup (line 105) still says "Dart Feature Flags". Consider unifying both so the gov/gov2 restriction reads the same regardless of which setup section the reader is in.
| {{< site-region region="gov,gov2" >}}<div class="alert alert-danger">Flutter Feature Flags are not supported for the selected <a href="/getting_started/site">Datadog site</a> ({{< region-param key="dd_site_name" >}}).</div>{{< /site-region >}} | |
| {{< site-region region="gov,gov2" >}}<div class="alert alert-danger">Datadog Feature Flags are not supported for the selected <a href="/getting_started/site">Datadog site</a> ({{< region-param key="dd_site_name" >}}).</div>{{< /site-region >}} |
|
|
||
| - **Web** (`@datadog/openfeature-browser`): `enableRumFeatureFlagTracking` | ||
| - **Android** (`dd-sdk-android-flags`): `rumIntegrationEnabled` | ||
| - **Flutter** (`datadog_flutter_plugin`): `rumIntegrationEnabled` |
There was a problem hiding this comment.
Suggestion: The two lists above (trackExposures, trackEvaluations) use **Dart and Flutter** (datadog_flags), but this list only mentions Flutter. A reader scanning the three sections may wonder whether pure Dart supports RUM integration or whether the row was simply forgotten. Consider adding a Dart row that explicitly says it is not exposed, mirroring the Unity: Not exposed pattern used below.
| - **Flutter** (`datadog_flutter_plugin`): `rumIntegrationEnabled` | |
| - **Flutter** (`datadog_flutter_plugin`): `rumIntegrationEnabled` | |
| - **Dart** (`datadog_flags`): Not exposed |
Motivation
Flutter customers who already initialize
datadog_flutter_pluginshould not have to duplicate Datadog client token, environment, site, service, version, and RUM application configuration just to use Feature Flags.DataDog/dd-sdk-flutter#1071adds a Flutter plugin integration layer over the standalone Dart Flags SDK, so the docs need a stacked update that explains the integrated setup path without blocking the standalone Dart guide.Changes
This PR stacks on
DataDog/documentation#37809and adds the Flutter-integrated setup to the same client guide. The page now documentsDatadogFlagsPluginConfiguration,DatadogSdk.instance.flags?.sharedClient(), client initialization withFlagsEvaluationContext, and the default behavior that successful variant evaluations are added to the active RUM view as feature flag evaluations.The PR also restores the customer-facing label from Dart to Dart and Flutter in the client SDK card grid, side navigation, and LaunchDarkly migration picker. The telemetry comparison table now includes the Flutter
rumIntegrationEnabledoption fromdatadog_flutter_plugin.Decisions
The Flutter integration docs stay stacked on the standalone Dart docs because
datadog_flutter_pluginintegration depends on the API added inDataDog/dd-sdk-flutter#1071. The standalone page remains the base layer for pure Dart apps and Flutter apps that want full lifecycle control; this PR adds the SDK-owned Flutter initialization path for apps that already use the Datadog Flutter SDK.The integration section uses the same API shape as
DataDog/dd-sdk-flutter#1071: registerDatadogFlagsPluginConfigurationwithDatadogConfiguration.addPlugin, initializeDatadogSdk, retrieve the plugin throughDatadogSdk.instance.flags, and evaluate through the same typedDatadogFlagsClientmethods as the standalone package.Validation
git diff --checkruby -e 'require "yaml"; YAML.load_file("config/_default/menus/main.en.yaml"); ARGV.each { |f| YAML.load_file(f); puts "ok #{f}" }' content/en/feature_flags/client/_index.md content/en/feature_flags/client/flutter.md content/en/feature_flags/guide/migrate_from_launchdarkly.mdpython3shortcode balance check for tabs, code blocks, and site-region blocks in touched Markdown files.