File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,14 +23,15 @@ import { OpenFeature } from '@openfeature/web-sdk'
2323
2424// Initialize the provider
2525const provider = new DatadogProvider ({
26+ applicationId: ' your-datadog-application-id' ,
2627 clientToken: ' your-datadog-client-token' ,
2728 enableExposureLogging: true ,
2829 enableFlagEvaluationTracking: true ,
2930 site: ' datadoghq.com' ,
3031})
3132
3233// Set the provider
33- await OpenFeature .setProvider (provider)
34+ await OpenFeature .setProviderAndWait (provider)
3435
3536// Get a client and evaluate flags
3637const client = OpenFeature .getClient ()
Original file line number Diff line number Diff line change @@ -16,14 +16,15 @@ import { OpenFeature } from '@openfeature/web-sdk'
1616
1717// Initialize the provider
1818const provider = new DatadogProvider ({
19+ applicationId: ' your-datadog-application-id' ,
1920 clientToken: ' your-datadog-client-token' ,
2021 enableExposureLogging: true ,
2122 enableFlagEvaluationTracking: true ,
2223 site: ' datadoghq.com' ,
2324})
2425
2526// Set the provider
26- await OpenFeature .setProvider (provider)
27+ await OpenFeature .setProviderAndWait (provider)
2728
2829// Get a client and evaluate flags
2930const client = OpenFeature .getClient ()
@@ -119,6 +120,7 @@ The full-featured default entry point supports both precomputed and rules-based
119120
120121``` javascript
121122import { configurationFromString , DatadogProvider , getPrecomputedContext } from ' @datadog/openfeature-browser'
123+ import { OpenFeature } from ' @openfeature/web-sdk'
122124
123125const configuration = configurationFromString (wire)
124126const context = getPrecomputedContext (configuration)
You can’t perform that action at this time.
0 commit comments