Skip to content

Commit 8ffac55

Browse files
cmanallencoolguyzoneryan953lizokmmichellewzhang
authored
feat(flags): Consolidate feature flags pull requests (#12005)
* Revert "Remove feature flag documentation from issue details page (#11734)" This reverts commit 9a7bded. * Add feature flag documentation to issue-details page * Fix spelling Co-authored-by: Alex Krawiec <[email protected]> * Add more docs * Clean up sentence * Point to 'Change Tracking Integration' heading * Update docs/product/issues/issue-details/index.mdx Co-authored-by: Ryan Albrecht <[email protected]> * Clean up * Add comma Co-authored-by: Liza Mock <[email protected]> * Another comma Co-authored-by: Liza Mock <[email protected]> * Fix wording Co-authored-by: Liza Mock <[email protected]> * Formatting Co-authored-by: Michelle Zhang <[email protected]> * Use correct naming Co-authored-by: Michelle Zhang <[email protected]> * Formatting and naming corrections Co-authored-by: Michelle Zhang <[email protected]> * Fix wording Co-authored-by: Liza Mock <[email protected]> * Clean up redundant documentation * Add OpenFeature integration docs * Fix namespacing * Remove extraneous information * Remove unused images * docs(flags): add index flag docs for python * :add beta label * docs(flags): add product index page for feature flags * add link to js * add info about second step * new link * docs(flags): add js index page * Simplify language specific documentation * Add prereqs * Simplify language * Update instructions * Add LaunchDarkly documentation * Misc updates * Cross link change tracking * Wording * De-dupe prerelease alert * Wording * Fix urls * Fix urls * Remove trailing slash * Remove trailing slash * Remove trailing slash * Add exposition * Reorganize includes * Re-word description * Remove change tracking include * Use platform-includes rather than regular includes since I can't make the latter work * Update links * Wording and styles * Hard code change tracking documentation * Reintroduce enable change tracking template * Wording * More language * Wording * Update version requirement * Remove closed beta message * Indent installation instructions * Add install and configure heading * Add evaluation tracking note * Move python after user feedback * s/LaunchDarkly/OpenFeature Co-authored-by: Ryan Albrecht <[email protected]> * Fix link * Remove options section * Link directly to the integration Co-authored-by: Ryan Albrecht <[email protected]> * Wording Co-authored-by: Jasmin <[email protected]> * Capitalization Co-authored-by: Jasmin <[email protected]> * Change order * Fix commas * Capitalization * Remove word * Wording * Move feature flags to the bottom * Remove reference to releases * Remove redundant link * Capitalization * Feedback * Add next steps include * Add supported list * Add DSN to examples * Remove metrics comment * Update next-steps text * Fix casing * Remove supported section * Fix nits * Use correct name * Use a bullet list * Remove word * Ordering * Link * Wording * Wording * Reword * Wording * Add Install, Configure, Verify, and Support Notes section for js integration docs * [getsentry/action-github-commit] Auto commit * Revert js change * Revert yarn * [getsentry/action-github-commit] Auto commit * [getsentry/action-github-commit] Auto commit * Better url * Wording * Add notice * Remove extraneous docs * Remove extraneous docs * Add magic url * Copy --------- Co-authored-by: Alex Krawiec <[email protected]> Co-authored-by: Ryan Albrecht <[email protected]> Co-authored-by: Liza Mock <[email protected]> Co-authored-by: Michelle Zhang <[email protected]> Co-authored-by: Michelle Zhang <[email protected]> Co-authored-by: Jasmin <[email protected]> Co-authored-by: Andrew Liu <[email protected]> Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
1 parent 7984c4e commit 8ffac55

File tree

20 files changed

+324
-7
lines changed

20 files changed

+324
-7
lines changed
149 KB
Loading

docs/organization/integrations/feature-flag/launchdarkly/index.mdx

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,43 @@
11
---
22
title: LaunchDarkly
33
sidebar_order: 1
4-
description: Learn about Sentry's LaunchDarkly integration. LaunchDarkly enables organizations to use Sentry errors as a metric in their LaunchDarkly experiments.
4+
description: Learn about Sentry's LaunchDarkly integrations.
55
---
66

7+
## Evaluation Tracking
8+
9+
Sentry can track flag evaluations as they happen within your application. Flag evaluations will appear in the "Feature Flag" section of Issue Details page as a table, with "suspect" flag predictions highlighted in yellow. Learn more about how to interact with feature flag insights within the Sentry UI by reading the [Issue Details page documentation](/product/issues/issue-details/#feature-flags).
10+
11+
### Set Up Evaluation Tracking
12+
13+
To set up evaluation tracking visit one of our supported languages pages:
14+
* [JavaScript](/platforms/javascript/configuration/integrations/launchdarkly/)
15+
* [Python](/platforms/python/integrations/launchdarkly/)
16+
17+
## Change Tracking
18+
19+
Sentry can track changes to feature flag definitions and report suspicious feature flag edits.
20+
21+
### Set Up Change Tracking
22+
23+
Enabling Change Tracking is a two step process. To get started visit the [feature-flags settings page](https://sentry.io/orgredirect/organizations/:orgslug/settings/feature-flags/) in a new tab. Then follow the steps listed below.
24+
25+
1. **Register the webhook URL**.
26+
- Under the "Integrate Feature Flag Service" heading a Sentry webhook URL has been provided.
27+
- Copy the Sentry webhook URL revealed in the fly out and paste it into LaunchDarkly within their [webhook integration UI](https://app.launchdarkly.com/settings/integrations/webhooks/new).
28+
2. **Set the Signing Secret**.
29+
- In the LaunchDarkly webhook UI check the box that says "Sign this webhook".
30+
- Copy the signing secret in the revealed input box and paste it into the input box labeled "Secret" on the Sentry fly out.
31+
- Save the secret by clicking "Save Secret" in the Sentry fly out.
32+
- Save the webhook by clicking "Save Settings" in LaunchDarkly.
33+
34+
Once saved Sentry will now accept and authenticate all inbound hooks to your organization's feature flag webhook endpoint.
35+
36+
## Metrics Integration
37+
738
This integration is maintained and supported by the company that created it. For more details or questions, feel free to contact [email protected].
839

9-
## Install and Configure
40+
### Install and Configure
1041

1142
<Note>
1243

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: LaunchDarkly
3+
description: "Learn how to use Sentry with LaunchDarkly."
4+
notSupported:
5+
- javascript.aws-lambda
6+
- javascript.azure-functions
7+
- javascript.bun
8+
- javascript.capacitor
9+
- javascript.cloudflare
10+
- javascript.connect
11+
- javascript.cordova
12+
- javascript.deno
13+
- javascript.electron
14+
- javascript.express
15+
- javascript.fastify
16+
- javascript.gcp-functions
17+
- javascript.hapi
18+
- javascript.koa
19+
- javascript.nestjs
20+
- javascript.nodejs
21+
- javascript.wasm
22+
---
23+
24+
<PlatformContent includePath="feature-flags/prerelease-alert" />
25+
26+
<Alert level="info">
27+
28+
This integration only works inside a browser environment.
29+
30+
</Alert>
31+
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. **At the moment, we only support boolean flag evaluations.**
33+
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.
39+
40+
## Configure
41+
42+
```JavaScript
43+
import * as Sentry from '@sentry/browser';
44+
import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
45+
46+
Sentry.init({
47+
dsn: "___PUBLIC_DSN___",
48+
integrations: [Sentry.launchDarklyIntegration()]
49+
});
50+
51+
const ldClient = LaunchDarkly.initialize(
52+
'my-client-ID',
53+
{kind: 'user', key: 'my-user-context-key'},
54+
{inspectors: [Sentry.buildLaunchDarklyFlagUsedHandler()]}
55+
);
56+
```
57+
58+
Learn more about the [LaunchDarkly SDK](https://docs.launchdarkly.com/sdk/client-side/javascript). At the moment, **we aren't officially supporting 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).
59+
60+
## Verify
61+
62+
The integration is tested by evaluating a feature flag with your LaunchDarkly SDK before capturing an exception.
63+
64+
```JavaScript
65+
import * as Sentry from '@sentry/browser';
66+
import * as LaunchDarkly from 'launchdarkly-js-client-sdk';
67+
68+
// Evaluate a flag with a default value, with the ldClient from the Configure step.
69+
// You may have to wait for your client to initialize before doing this.
70+
ldClient?.variation("hello", false);
71+
72+
Sentry.captureException(Exception("Something went wrong!"))
73+
```
74+
75+
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
76+
77+
<PlatformContent includePath="feature-flags/next-steps" />
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
title: OpenFeature
3+
description: "Learn how to use Sentry with OpenFeature."
4+
notSupported:
5+
- javascript.aws-lambda
6+
- javascript.azure-functions
7+
- javascript.bun
8+
- javascript.capacitor
9+
- javascript.cloudflare
10+
- javascript.connect
11+
- javascript.cordova
12+
- javascript.deno
13+
- javascript.electron
14+
- javascript.express
15+
- javascript.fastify
16+
- javascript.gcp-functions
17+
- javascript.hapi
18+
- javascript.koa
19+
- javascript.nestjs
20+
- javascript.nodejs
21+
- javascript.wasm
22+
---
23+
24+
<PlatformContent includePath="feature-flags/prerelease-alert" />
25+
26+
<Alert level="info">
27+
28+
This integration only works inside a browser environment.
29+
30+
</Alert>
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. **At the moment, we only support boolean flag evaluations.**
33+
34+
_Import name: `Sentry.openFeatureIntegration` and `Sentry.OpenFeatureIntegrationHook`_
35+
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.
39+
40+
## Configure
41+
42+
```JavaScript
43+
import * as Sentry from '@sentry/browser';
44+
import { OpenFeature } from '@openfeature/web-sdk';
45+
46+
Sentry.init({
47+
dsn: "___PUBLIC_DSN___",
48+
integrations: [Sentry.openFeatureIntegration()]
49+
});
50+
51+
OpenFeature.setProvider(new MyProviderOfChoice());
52+
53+
// Option 1: track all OpenFeature evaluations.
54+
OpenFeature.addHooks(new Sentry.OpenFeatureIntegrationHook());
55+
56+
// Option 2: only track evaluations by a specific client.
57+
const client = OpenFeature.getClient();
58+
client.addHooks(new Sentry.OpenFeatureIntegrationHook());
59+
```
60+
61+
Learn more about OpenFeature providers [here](https://openfeature.dev/docs/reference/concepts/provider).
62+
63+
## Verify
64+
65+
The integration is tested by evaluating a feature flag with your OpenFeature SDK before capturing an exception.
66+
67+
```JavaScript
68+
import * as Sentry from '@sentry/browser';
69+
import { OpenFeature } from '@openfeature/web-sdk';
70+
71+
// Evaluate a flag with a default value. If you added the hook to a client in
72+
// the Configure step, make sure to use the same client here.
73+
const client = OpenFeature.getClient();
74+
const result = client.getBooleanValue('hello', false);
75+
76+
Sentry.captureException(Exception("Something went wrong!"))
77+
```
78+
79+
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
80+
81+
<PlatformContent includePath="feature-flags/next-steps" />
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
title: Set Up Feature Flags
3+
sidebar_order: 7000
4+
notSupported:
5+
- javascript.aws-lambda
6+
- javascript.azure-functions
7+
- javascript.bun
8+
- javascript.capacitor
9+
- javascript.cloudflare
10+
- javascript.connect
11+
- javascript.cordova
12+
- javascript.deno
13+
- javascript.electron
14+
- javascript.express
15+
- javascript.fastify
16+
- javascript.gcp-functions
17+
- javascript.hapi
18+
- javascript.koa
19+
- javascript.nestjs
20+
- javascript.nodejs
21+
- javascript.wasm
22+
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log feature flag changes, and reports any suspicious updates that may have caused an error.
23+
---
24+
25+
<PlatformContent includePath="feature-flags/prerelease-alert" />
26+
27+
## Prerequisites
28+
29+
* You have the <PlatformLink to="/">JavaScript SDK installed</PlatformLink> (version 8.41.0-beta.1).
30+
31+
## Enable Evaluation Tracking
32+
33+
Evaluation tracking requires enabling an SDK integration. Integrations are provider specific. Documentation for supported providers is listed below.
34+
- [OpenFeature](/platforms/javascript/configuration/integrations/openfeature/)
35+
- [LaunchDarkly](/platforms/javascript/configuration/integrations/launchdarkly/)
36+
37+
<PlatformContent includePath="feature-flags/enable-change-tracking" />
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Set Up Feature Flags
3+
sidebar_order: 7000
4+
description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log feature flag changes, and reports any suspicious updates that may have caused an error.
5+
---
6+
7+
<PlatformContent includePath="feature-flags/prerelease-alert" />
8+
9+
## Prerequisites
10+
11+
* You have the <PlatformLink to="/">Python SDK installed</PlatformLink> (version 2.18.0 or higher).
12+
13+
## Enable Evaluation Tracking
14+
15+
Evaluation tracking requires enabling an SDK integration. Integrations are provider specific. Documentation for supported providers is listed below.
16+
17+
- [OpenFeature](/platforms/python/integrations/openfeature/)
18+
- [LaunchDarkly](/platforms/python/integrations/launchdarkly/)
19+
20+
<PlatformContent includePath="feature-flags/enable-change-tracking" />

docs/platforms/python/integrations/launchdarkly/index.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: LaunchDarkly
3-
description: "Learn about the LaunchDarkly integration and how to add it to your integrations list."
3+
description: "Learn how to use Sentry with LaunchDarkly."
44
---
55

6-
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.
6+
<PlatformContent includePath="feature-flags/prerelease-alert" />
7+
8+
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.**
79

810
## Install
911

@@ -44,3 +46,5 @@ sentry_sdk.capture_exception(Exception("Something went wrong!"))
4446
```
4547

4648
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
49+
50+
<PlatformContent includePath="feature-flags/next-steps" />

docs/platforms/python/integrations/openfeature/index.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
---
22
title: OpenFeature
3-
description: "Learn about the OpenFeature integration and how to add it to your integrations list."
3+
description: "Learn how to use Sentry with OpenFeature."
44
---
55

6-
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.
6+
<PlatformContent includePath="feature-flags/prerelease-alert" />
7+
8+
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.**
79

810
## Install
911

@@ -19,7 +21,7 @@ Add `OpenFeatureIntegration()` to your `integrations` list:
1921

2022
```python
2123
import sentry_sdk
22-
from sentry_sdk.integrations.OpenFeature import OpenFeatureIntegration
24+
from sentry_sdk.integrations.openfeature import OpenFeatureIntegration
2325

2426
sentry_sdk.init(
2527
dsn="___PUBLIC_DSN___",
@@ -44,3 +46,5 @@ sentry_sdk.capture_exception(Exception("Something went wrong!"))
4446
```
4547

4648
Visit the Sentry website and confirm that your error event has recorded the feature flag "hello" and its value "false".
49+
50+
<PlatformContent includePath="feature-flags/next-steps" />
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: "Feature Flags"
3+
sidebar_order: 100
4+
description: "Learn how to set up and interact with Sentry's feature flag evaluation tracking and feature flag change tracking."
5+
---
6+
7+
<PlatformContent includePath="feature-flags/prerelease-alert" />
8+
9+
Enabling a feature flag integration provides deep insights into the state of your application prior to an error. A list of flags and their evaluation results are displayed on each error event in the order of evaluation. Integrating Sentry with your feature flag provider enables Sentry to correlate feature flag changes with new error events and mark certain changes as suspicious.
10+
11+
## Evaluation Tracking
12+
13+
Flag evaluations will appear in the "Feature Flag" section of Issue Details page as a table, with "suspect" flag predictions highlighted in yellow. Learn more about how to interact with feature flag insights within the Sentry UI by reading the [Issue Details page documentation](/product/issues/issue-details/#feature-flags).
14+
15+
### Set Up Evaluation Tracking
16+
17+
To set up evaluation tracking visit your provider's integration documentation page:
18+
* [JavaScript](/platforms/javascript/feature-flags/)
19+
* [Python](/platforms/python/feature-flags/)
20+
21+
## Change Tracking
22+
23+
Change tracking enables Sentry to listen for additions, removals, and modifications to your feature flags. On change, we'll record the change event in the audit log. The audit log appears in the "event volume" chart and presents itself as a "release" line. If the change is responsible for a new error event, we'll notify you by marking the feature flag as "suspect" on the Issue Details page. Learn more about how to interact with feature flag insights within the Sentry UI by reading the [Issue Details documentation](/product/issues/issue-details/#feature-flags).
24+
25+
### Set Up Change Tracking
26+
27+
To set up change tracking visit your provider's integration documentation page:
28+
* [LaunchDarkly](/organization/integrations/feature-flag/launchdarkly/#change-tracking)
-58 KB
Binary file not shown.

0 commit comments

Comments
 (0)