You can associate arbitrary key/value pairs with your crash reports by FirebaseCrashlytics.getInstance().setCustomKey(key, value)
Fine.
But how can I revert those when I don't need anymore?
Consider following code:
// report 'ex_1' with "info" key
FirebaseCrashlytics.getInstance().setCustomKey("info", "abc");
FirebaseCrashlytics.getInstance().recordException(ex_1);
//Now I want to clear custom keys, so I want to report 'ex_2' without "info"
//FirebaseCrashlytics.getInstance().REMOVECustomKey("info");
FirebaseCrashlytics.getInstance().recordException(ex_2);
Once you have Crashlytics up and running in your app, you can navigate to Crashlytics in your Firebase Console underneath 'Quality' and start reviewing the reports as they come in. If this page still tells you to setup, build or run your app then you have not correctly setup Crashlytics in your app (see Usage).
Crashlytics associates the logs with your crash data and displays them in the Crashlytics page of the Firebase console, under the Logs tab.
I don't see anything in the SDK that allows for this. They should really offer some way to clear the Custom Keys but the SDK does not allow for nullable values either.
The way I went around it was just to override the one-shot custom keys with a 0
.
// Set key
FirebaseCrashlytics.getInstance().setCustomKey("key", "value")
// Clear key
FirebaseCrashlytics.getInstance().setCustomKey("key", 0)
It is not the cleanest approach but at least you know those values got reset.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With