You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/launchdarkly.mdx
+30-6Lines changed: 30 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,15 @@ This integration only works inside a browser environment.
29
29
30
30
</Alert>
31
31
32
-
The [LaunchDarkly](https://launchdarkly.com/) integration tracks feature flag evaluations produced by the LaunchDarkly SDK. These evaluations are held in memory and sent to Sentry for review and analysis if an error occurs. **At the moment, we only support boolean flag evaluations.**
32
+
The [LaunchDarkly](https://launchdarkly.com/) integration tracks feature flag evaluations produced by the LaunchDarkly SDK. These evaluations are held in memory, and in the event an error occurs, sent to Sentry for review and analysis.
33
33
34
-
_Import name: `Sentry.launchDarklyIntegration` and `Sentry.buildLaunchDarklyFlagUsedHandler`_
34
+
_Import names: `Sentry.launchDarklyIntegration` and `Sentry.buildLaunchDarklyFlagUsedHandler`_
35
+
36
+
## Install
37
+
38
+
Install [`@sentry/browser`](https://www.npmjs.com/package/@sentry/browser) and [`launchdarkly-js-client-sdk`](https://www.npmjs.com/package/launchdarkly-js-client-sdk) from npm.
// Evaluate a flag with a default value, with the ldClient from the Configure step.
67
+
// You may have to wait for your client to initialize before doing this.
68
+
ldClient?.variation("hello", false);
69
+
70
+
Sentry.captureException(Exception("Something went wrong!"))
71
+
```
72
+
73
+
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false". For a full end-to-end test, you must create the flag and a targeting rule in LaunchDarkly.
74
+
Learn more about the LaunchDarkly SDK [here](https://docs.launchdarkly.com/sdk/client-side/javascript).
75
+
76
+
## Support Notes
77
+
**At the moment, we only support boolean flag evaluations.**
78
+
79
+
We do not officially support framework-specific LaunchDarkly SDKs. However, you may reuse the setup code for [React](https://www.npmjs.com/package/launchdarkly-react-client-sdk) and [client-side Node.js](https://www.npmjs.com/package/launchdarkly-node-client-sdk).
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/configuration/integrations/openfeature.mdx
+34-4Lines changed: 34 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,9 +29,15 @@ This integration only works inside a browser environment.
29
29
30
30
</Alert>
31
31
32
+
The [OpenFeature](https://openfeature.dev/) integration tracks feature flag evaluations produced by the OpenFeature SDK. These evaluations are held in memory, and in the event an error occurs, sent to Sentry for review and analysis.
33
+
32
34
_Import name: `Sentry.openFeatureIntegration` and `Sentry.OpenFeatureIntegrationHook`_
33
35
34
-
The [OpenFeature](https://openfeature.dev/) integration tracks feature flag evaluations produced by the OpenFeature SDK. These evaluations are held in memory and sent to Sentry for review and analysis if an error occurs. **At the moment, we only support boolean flag evaluations.**
36
+
## Install
37
+
38
+
Install [`@sentry/browser`](https://www.npmjs.com/package/@sentry/browser) and [`@openfeature/web-sdk`](https://www.npmjs.com/package/@openfeature/web-sdk) from npm.
Learn more about OpenFeature providers [here](https://openfeature.dev/docs/reference/concepts/provider). You can use the InMemoryProvider to quickly verify the integration.
62
+
63
+
## Verify
47
64
48
-
// Evaluating flags will record the result on the Sentry client.
Sentry.captureException(Exception("Something went wrong!"))
50
77
```
51
78
52
-
Learn more about the [OpenFeature SDK](https://github.com/open-feature/js-sdk/tree/main).
79
+
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false". Learn more about the OpenFeature SDK at https://github.com/open-feature/js-sdk/tree/main.
80
+
81
+
## Support Notes
82
+
**At the moment, we only support boolean flag evaluations.**
0 commit comments