getsentry / getsentry/sentry-java

Add support for Firebase Remote Config Feature Flags

Aperta
#4,943 1 commento 2 reazioni 0 assegnatari Vedi su GitHub
Android Errors Feature
Lingua principale
Kotlin
Stelle
1.4k
Fork
478
Merge medio
2g 23h
PR unite (30g)
67

Descrizione

### Problem Statement

Add a hook for Firebase Remote Config that tracks Feature Flag evaluations in Sentry.

### Solution Brainstorm

Something like:
```java
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 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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.