-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(feature-flag): add documentation for php feature flags #15443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
bb853cf
7314633
05b9c1c
e6d7049
42f0e7b
592b238
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| title: Set Up Feature Flags | ||
| sidebar_title: Feature Flags | ||
| sidebar_order: 7000 | ||
| description: With Feature Flags, Sentry tracks feature flag evaluations in your application, keeps an audit log of feature flag changes, and reports any suspicious updates that may have caused an error. | ||
| --- | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - [Sentry SDK](/) version `4.18.0` or above. | ||
|
|
||
| ## Enable Evaluation Tracking | ||
|
|
||
| <PlatformContent includePath="feature-flags/evaluation-tracking-index" /> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ### Generic API | ||
| You can use the generic API to manually track feature flag evaluations. These evaluations are held in memory and are sent to Sentry on error and transaction events. **At the moment, we only support boolean flag evaluations.** | ||
|
|
||
| ```php | ||
| \Sentry\addFeatureFlag('test-flag', false); | ||
|
|
||
| captureException(new \RuntimeException("Something went wrong!")); | ||
|
||
| ``` | ||
|
|
||
| Go to your Sentry project and confirm that your error event has recorded the feature flag "test-flag" and its value "false". | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might want to call out how many feature flags you can set.