Skip to content

Commit 3724ffd

Browse files
committed
Add SDK docs and links
1 parent 3943011 commit 3724ffd

File tree

5 files changed

+54
-3
lines changed

5 files changed

+54
-3
lines changed

docs/platforms/javascript/common/configuration/integrations/featureflags.mdx renamed to docs/platforms/javascript/common/configuration/integrations/self-serve.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: FeatureFlags
2+
title: Self-Serve Feature Flags Integration
33
description: "Learn how to attach custom feature flag data to Sentry error events."
44
notSupported:
55
- javascript.aws-lambda

docs/platforms/javascript/common/feature-flags/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ description: With Feature Flags, Sentry tracks feature flag evaluations in your
3333
Evaluation tracking requires enabling an SDK integration. Integrations are provider specific. Documentation for supported providers is listed below.
3434
- [OpenFeature](/platforms/javascript/configuration/integrations/openfeature/)
3535
- [LaunchDarkly](/platforms/javascript/configuration/integrations/launchdarkly/)
36-
- [Generic Support](/platforms/javascript/configuration/integrations/featureflags/) - if you use an unsupported or in-house provider, you may manually track evaluations through an API.
36+
- [Self-Serve](/platforms/javascript/configuration/integrations/self-serve/)
3737

3838
<PlatformContent includePath="feature-flags/enable-change-tracking" />

docs/platforms/python/feature-flags/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ Evaluation tracking requires enabling an SDK integration. Integrations are provi
1616

1717
- [OpenFeature](/platforms/python/integrations/openfeature/)
1818
- [LaunchDarkly](/platforms/python/integrations/launchdarkly/)
19-
- [Generic Support](/platforms/javascript/configuration/integrations/featureflags/) - if you use an unsupported or in-house provider, you may manually track evaluations through an API.
19+
- [Self-Serve](/platforms/python/integrations/self-serve/)
2020

2121
<PlatformContent includePath="feature-flags/enable-change-tracking" />
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Self Serve Feature Flags
3+
description: "Learn how to attach custom feature flag data to Sentry error events."
4+
---
5+
6+
<PlatformContent includePath="feature-flags/prerelease-alert" />
7+
8+
The Feature Flags integration allows you to manually track feature flag evaluations through an API. These evaluations are held in memory, and in the event an error occurs, sent to Sentry for review and analysis.
9+
**At the moment, we only support boolean flag evaluations.**
10+
11+
## Install
12+
13+
Install `sentry-sdk` from PyPI.
14+
15+
```bash
16+
pip install --upgrade 'sentry-sdk'
17+
```
18+
19+
## Configure
20+
21+
Add `FeatureFlagsIntegration()` to your `integrations` list:
22+
23+
```python
24+
import sentry_sdk
25+
from sentry_sdk.integrations.featureflags import FeatureFlagsIntegration
26+
27+
sentry_sdk.init(
28+
dsn="___PUBLIC_DSN___",
29+
integrations=[
30+
FeatureFlagsIntegration(),
31+
],
32+
)
33+
```
34+
35+
## Verify
36+
37+
The integration is tested by calling the `add_feature_flag` API before capturing an exception.
38+
39+
```python
40+
import sentry_sdk
41+
from sentry_sdk.integrations.featureflags import add_feature_flag
42+
43+
add_feature_flag('test-flag', False)
44+
45+
sentry_sdk.capture_exception(Exception("Something went wrong!"))
46+
```
47+
48+
Visit the Sentry website and confirm that your error event has recorded the feature flag "test-flag" and its value "false".
49+
50+
<PlatformContent includePath="feature-flags/next-steps" />

docs/product/explore/feature-flags/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,4 @@ Change tracking enables Sentry to listen for additions, removals, and modificati
3030

3131
To set up change tracking, visit the webhook integration documentation for your provider:
3232
* [LaunchDarkly](/organization/integrations/feature-flag/launchdarkly/#change-tracking)
33+
* [Self-Serve](/organization/integrations/feature-flag/self-serve/#change-tracking)

0 commit comments

Comments
 (0)