androidreact-nativecrashlyticstwitter-fabriccrashlytics-android

How to effectively group non fatal exceptions in Crashlytics (Fabrics)?


We are using Crashlytics in our app as the crash reporting tool. For Android native crashes, it's working fine and grouping the crashes correctly. Our app also has few components in react-native. For the crashes which occur in these components, we catch them and then log them to Crashlytics as non-fatal exceptions.

public class PlatformNativeModuleCallExceptionhandler implements 
NativeModuleCallExceptionHandler {
@Override
public void handleException(Exception e) {
    try {
        .
        .
        .
        Crashlytics.logException(new Exception(exceptionString));
    } catch (Exception ex) {}
}

Crashes are getting logged in Crashlytics dashboard, but it's showing all the crashes inside a single tab. These might be different crashes of the same or different react-native components.

enter image description here

Due to this we are not able to find out the instances of a particular crash. Need to manually go through each instance of the crash.

I guess it takes the name of the class where exception gets created, in this case PlatformNativeModuleCallExceptionHandler. I tried creating my own custom exception class but that also did not help.

Does anybody know how we can group the non fatal exceptions better here? All the similar crashes should be grouped together with their total instances.


Solution

  • Crashlytics uses the method and crash line number to group crashes, so if you have an exception handler method for all of your non-fatals, they'll be grouped together. There isn't currently a workaround for this.