Crashlytics custom keys are not deleted after sending a non-fatal exception
See original GitHub issueStep 1: Describe your environment
- Android Studio version: 4.1
- Firebase Component: crashlytics, messaging
- Component version: Crashlytics v17.2.1 | messaging v17.6.0
Step 2: Describe the problem
Crashlytics custom keys are not deleted after sending a non-fatal exception
Steps to reproduce:
- I log some non-fatal exception with additional info (as described here: https://firebase.google.com/docs/crashlytics/customize-crash-reports?platform=android#log-excepts). Here is the function:
fun logNonFatalException(e: Exception) {
if (e is MyCustomException) {
FirebaseCrashlytics.getInstance().setCustomKey(e.key, e.value)
}
FirebaseCrashlytics.getInstance().recordException(e)
}
Then if any exception else happened, I will see next Crashlytics reports with all of the custom keys I added before.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8
Top Results From Across the Web
Customize your Firebase Crashlytics crash reports - Google
Custom keys help you get the specific state of your app leading up to a crash. You can associate arbitrary key/value pairs with...
Read more >Crashlytics(Android) clear log before next crash - Stack Overflow
I have a situation where I want to add some logs to Crashlystic for Android, but not always send it.
Read more >Boost your Crashlytics reports with custom keys & log messages
Firebase Crashlytics provides two important tools to log some extra information about your crashes and non-fatal issues: custom keys and logs messages.
Read more >Firebase crashlytics not able to read crash reports · Issue #1559
I was enabling Crashlytics into my android app and seem to get the same error when I throw a custom error to test...
Read more >FirebaseCrashlytics not logging non-fatal errors (Android)
Pretty sure that you need to recordException to send to crashlytics and all logs just gets added to that exception. Otherwise it just...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Got it, thanks again.
My major problem is that I want to attach custom info to a particular exception and I have no idea how to do that in Crashlytics. Docs suggest to use custom keys so I tried to follow the advice and ended up with that issue: before recording the exception I add custom info using keys. After recording the exception I remove the keys. Since exception recording is async the keys are removed BEFORE the recording happens. I’m not sure I understand what issue should I create exactly? That I can’t attach custom info to an exception or that custom keys API doesn’t handle that case?