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.
Currently in Beta
Feature flag change tracking and feature flag evaluation tracking is currently in open beta.
- You have the Python SDK installed.
Evaluation tracking typically requires enabling an SDK integration. Integrations are provider specific. Documentation for supported providers is listed below.
The generic API allows you to manually track feature flag evaluations. These evaluations are held in memory, and in the event an error occurs, sent to Sentry for review and analysis. Specifically, the generic integration enables users to integrate with proprietary (or otherwise unsupported) feature flagging solutions. At the moment, we only support boolean flag evaluations.
from sentry_sdk.feature_flags import add_feature_flag
add_feature_flag('test-flag', False) # Records an evaluation and its result.
sentry_sdk.capture_exception(Exception("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".
Change tracking requires registering a Sentry webhook with your feature flag provider. Set up varies by provider and is documented in detail here.
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").