Firebase Remote Config
Learn more about the Sentry Firebase Remote Config integration for the Dart SDK.
The sentry_firebase_remote_config integration provides Firebase Remote Config support for Sentry, providing insight into feature flag evaluations.
- Adding the
SentryFirebaseRemoteConfigintegration will automatically track feature flag evaluations. - Only boolean values are supported.
- Sentry SDK version
9.0.0or higher. - Firebase Remote Config is set up.
To use the SentryFirebaseRemoteConfig integration, add the sentry_firebase_remote_config dependency.
pubspec.yamldependencies:
sentry: ^9.0.0
sentry_firebase_remote_config: ^9.0.0
Add the SentryFirebaseRemoteConfig integration to the Sentry SDK initialization.
await SentryFlutter.init(
(options) {
options.addIntegration(
SentryFirebaseRemoteConfigIntegration(
firebaseRemoteConfig: firebaseRemoteConfig,
),
);
},
);
The integration will automatically call await remoteConfig.activate(); when the config is updated. If you don't want this behavior, you can set activateOnConfigUpdated to false.
SentryFirebaseRemoteConfigIntegration(
firebaseRemoteConfig: firebaseRemoteConfig,
activateOnConfigUpdated: false,
),
Update a boolean Firebase Remote Config value to true. Keep in mind that values will be evaluated as bool if their string values are true, false, 1, or 0. So numerical values of 1 or 0 will be evaluated as true or false boolean values respectively.
To view the recorded feature flag evaluation, log into sentry.io and open your project.
Flag evaluations will appear in the "Feature Flag" section of Issue Details page as a table, with "suspect" flag predictions highlighted in yellow.
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").