Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions hugo/content/en/feature_flags/client/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,23 @@ Default: `true`. Set to `false` to disable.
- **React Native**: `rumIntegrationEnabled`
- **Unity**: Not exposed

### Use RUM user context for evaluation

For client SDKs that support RUM user context, enabling RUM integration also uses attributes from the current RUM user as defaults for evaluation context:

- The RUM user ID supplies the targeting key when the application evaluation context does not define one.
- Flat string, number, and Boolean user attributes supply evaluation attributes. Nested objects, arrays, `null`, and other values are excluded rather than flattened.
- Fields explicitly supplied through the application evaluation context take precedence over fields from the RUM user.

Initialize RUM and set the RUM user before creating the Feature Flags client or provider. This lets the SDK include RUM user attributes in its initial assignment request.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the following line somewhere:

A field with an undefined value passed to OpenFeature context suppresses the corresponding RUM attribute and is therefor omitted from the effective context used by the flagging evaluator and downstream telemetry.

Changing the RUM user after Feature Flags initialization does not automatically update the effective evaluation context. After a login, logout, or account switch:

1. Update the user through the platform's RUM user API.
2. Trigger an evaluation context update through the platform's Feature Flags API. Reuse the application's explicit evaluation context so those fields remain intact.

The user and context APIs differ by client SDK. Select your platform from the cards at the top of this page for API details. Until the context update completes, the client or provider continues to use the previous effective context for assignment requests, evaluations, and telemetry. On platforms that expose a RUM integration setting, disabling RUM integration also disables RUM user context enrichment.

## Testing with in-memory providers

Datadog supports these testing approaches:
Expand Down
Loading