Set Up Feature Flags
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.
- Sentry SDK version
4.18.1or above.
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.
Each event can record up to 100 feature flag evaluations; if more are sent, only the most recent 100 are kept.
Copied
\Sentry\addFeatureFlag('test-flag', false);
\Sentry\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".
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").