NTP-65683 | RUM integration (#1181)

Co-authored-by: yashmantri <mantri.ramkishor@navi.com>
This commit is contained in:
Aishwarya Srivastava
2025-05-27 18:14:48 +05:30
committed by GitHub
parent 75b3070179
commit c6026e33e4
7 changed files with 58 additions and 25 deletions

View File

@@ -182,10 +182,13 @@ public class MainApplication extends Application implements ReactApplication, Ap
return;
}
Map<String, String> anrEventProperties = new HashMap<>();
anrEventProperties.put(SCREEN_NAME, BuildConfig.APP_NAME);
String screenName = BuildConfig.APP_NAME + "_ANR_CRASH";
anrEventProperties.put(SCREEN_NAME, screenName);
anrEventProperties.put(METHOD_NAME, error.getCause().getStackTrace()[0].getMethodName());
anrEventProperties.put(LINE_NUMBER, String.valueOf(error.getCause().getStackTrace()[0].getLineNumber()));
anrEventProperties.put(APP_IN_FOREGROUND, String.valueOf(isAppInForeground()));
anrEventProperties.put("isNae", "true");
anrEventProperties.put("errorTitle", "Something went wrong");
if (isAlfredEnabledFromFirebase && AlfredManager.INSTANCE.isAlfredRecordingEnabled()
&& alfredConfig.getAnrEnableStatus() && isAppInForeground()) {
@@ -209,11 +212,13 @@ public class MainApplication extends Application implements ReactApplication, Ap
}
try {
Map<String, String> crashEventProperties = new HashMap<>();
crashEventProperties.put(SCREEN_NAME, BuildConfig.APP_NAME);
String screenName = BuildConfig.APP_NAME + "_NATIVE_CRASH";
crashEventProperties.put(SCREEN_NAME, screenName);
crashEventProperties.put(METHOD_NAME, exception.getStackTrace()[0].getMethodName());
crashEventProperties.put(LINE_NUMBER, String.valueOf(exception.getStackTrace()[0].getLineNumber()));
crashEventProperties.put(APP_IN_FOREGROUND, String.valueOf(isAppInForeground()));
crashEventProperties.put("isNae", "true");
crashEventProperties.put("errorTitle", "Something went wrong");
if (isAlfredEnabledFromFirebase && AlfredManager.INSTANCE.isAlfredRecordingEnabled()
&& alfredConfig.getCrashEnableStatus() && isAppInForeground()) {
StackTraceElement stackTraceElement = exception.getStackTrace()[0];