getsentry / getsentry/sentry-java

Add support for Firebase Remote Config Feature Flags

未关闭
#4,943 1 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看
Android Errors Feature
主要语言
Kotlin
星标
1.4k
派生
478
平均合并
2 天 23 小时
30 天内合并 PR
67

描述

### 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.

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。