-
-
Notifications
You must be signed in to change notification settings - Fork 464
Open
Labels
Description
Problem Statement
Add a hook for Firebase Remote Config that tracks Feature Flag evaluations in Sentry.
Solution Brainstorm
Something like:
public class SentryFirebaseRemoteConfigListener implements ConfigUpdateListener {
private final IScopes scopes;
private final FirebaseRemoteConfig remoteConfig;
@Override
public void onUpdate(ConfigUpdate configUpdate) {
// Track all boolean flags that were updated
Set<String> updatedKeys = configUpdate.getUpdatedKeys();
for (String key : updatedKeys) {
try {
boolean value = remoteConfig.getBoolean(key);
scopes.addFeatureFlag(key, value);
} catch (Exception e) {
// Log error, don't break
}
}
}
@Override
public void onError(ConfigUpdateException error) {
// Log error but don't track as feature flag
}
}Also look at what Flutter SDK is doing: https://github.com/getsentry/sentry-dart/blob/main/packages/firebase_remote_config/lib/src/sentry_firebase_remote_config_integration.dart
Please π if you would like us to implement this.
adinauer and romtsn