Set Up Feature Flags

Generic Feature Flags Integration.

The Feature Flags integration allows you to manually track feature flag evaluations through an API. These evaluations are held in memory and sent to Sentry on error and transaction events. At the moment, we only support boolean flag evaluations.

Copied
import * as Sentry from "@sentry/react-native";

const flagsIntegration = Sentry.featureFlagsIntegration();
flagsIntegration.addFeatureFlag("feature_flag_a", true);

Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0
example-org / example-project
"
,
integrations: [flagsIntegration], });

Calling this function multiple times with the same flag name will override the previous value.

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").