调整 Sentry 的上报内容

This commit is contained in:
juntao
2020-11-26 20:22:05 +08:00
parent dd756fce00
commit 715cecd44b

View File

@ -65,18 +65,14 @@ public class DataUtils {
});
Sentry.configureScope(scope -> {
scope.setContexts("gid", HaloApp.getInstance().getGid());
if (UserManager.getInstance().isLoggedIn()) {
User user = new User();
user.setId(UserManager.getInstance().getUserId());
scope.setUser(user);
}
User user = new User();
user.setId(HaloApp.getInstance().getGid());
scope.setUser(user);
if (BuildConfig.BUILD_TIME != 0L) {
scope.setContexts("alias", "内测版" + BuildConfig.VERSION_NAME + "_" + BuildConfig.BUILD_TIME);
scope.setTag("alias", "内测版" + BuildConfig.VERSION_NAME + "_" + BuildConfig.BUILD_TIME);
} else {
scope.setContexts("alias", "正式版" + BuildConfig.VERSION_NAME);
scope.setTag("alias", "正式版" + BuildConfig.VERSION_NAME);
scope.setTag("channel", channel);
}
});