This product is not supported for your selected Datadog site. ().
Overview
When you test or demo a feature flag integration, you often need to force a specific variant without changing the flag configuration in Datadog. The OpenFeature Multi-Provider pattern combines an InMemoryProvider with your Datadog provider so local overrides take precedence while all other flags continue to resolve from Datadog.
Typical use cases include:
QA and manual testing of specific flag variants
Local development without editing flag configuration in the UI
Demos and support workflows where a teammate needs a predictable variant on demand
Use local overrides only in non-production environments. Restrict or disable this pattern in production builds so end users cannot change flag behavior through local configuration.
How local flag overrides work
OpenFeature’s Multi-Provider wraps multiple providers behind a single client. By default, it uses the First Match strategy:
If the first provider returns a value for the flag, that value is used and later providers are skipped.
If the first provider returns FLAG_NOT_FOUND, evaluation continues to the next provider.
Datadog serves as the fallback for any flag not present in the in-memory override set.
Providers are evaluated in the order you register them. Place the InMemoryProviderfirst in the provider list so overrides take precedence over Datadog.
For more detail on evaluation strategies, see First Match strategy in the OpenFeature specification.
Client override examples
The Multi-Provider override pattern is supported on JavaScript, React, Angular, React Native, iOS, and Android. On iOS and Android SDKs, MultiProvider is available, but the OpenFeature SDKs do not ship a built-in in-memory provider. Implement a small custom FeatureProvider instead, as shown in the iOS and Android testing documentation.
The following examples use browser JavaScript and show two common ways to populate overrides. Adapt the loadOverrides function to match how your team prefers to set overrides, or to the storage mechanism available on your platform (for example, UserDefaults on iOS or SharedPreferences on Android).
URL query parameters
Read overrides from the page URL at startup. This approach is useful when QA or support needs to share a link that forces specific variants:
On the server, populate the in-memory provider at process startup from any local source. Environment variables and static configuration maps are two common approaches.
The Multi-Provider utility is available in the Node.js, Go, Java, PHP, and .NET OpenFeature SDKs.
Environment variables
Read overrides from environment variables at startup. This approach is useful for one-off local runs or CI jobs that need a specific variant:
Set FF_checkout_new=true and FF_ui_theme=dark in the environment before starting the process to force those variants.
Evaluate flags
After initialization, evaluate flags through the OpenFeature client as usual. Overridden flags return the forced value; all other flags resolve from Datadog.