Crashlytics non-fatal log reporting

1,373 views
Skip to first unread message

Seiju Sato

unread,
Apr 25, 2023, 9:55:38 AM4/25/23
to Firebase Google Group
Hi all,

Currently our mobile app team is planning to implement send custom non-fatal error logs to Firebase Crashlytics.

But we are now concerned about if our apps logs too much, whether it does have a bad side effect in terms of Firebase usage for example Google will not allow us to save any further data or other data usually we can get from Firebase SDK out of the box.

I found the following caution in the page below.

Caution: Avoid using unique values, such as user ID, product ID, and timestamps in the domain and code fields. Using unique values in these fields causes a high cardinality of issues and may result in Crashlytics needing to limit the reporting of logged errors in your app. Unique values should instead be added to the userInfo dictionary object.


I'd like to know whether we have any side effect for massive logging.

Thank you.

Joe Spiro

unread,
Apr 26, 2023, 11:45:17 AM4/26/23
to Firebase Google Group
Hello,

To clarify, the warning is not saying that you should avoid unique values in your logs and is also not saying that should limit logging. It is saying you can place the unique values into the userInfo dictionary instead.

"Unlike fatal crashes, which are grouped via stack trace analysis, logged errors are grouped by domain and code[...] logged errors that use the same domain and code values are grouped under the same issue."

Domain and code, should not contain the logged information themselves as they are used to categorize logs and not to contain arbitrary information. If there are too many different values of domain and code, reporting of the logged errors will be limited.

Domain and code instead each should contain one of a small set of values and serve as a category for the payload userInfo dictionary.

A different but related limit:

There are limits to how many NSErrors can be recorded during a run of an individual client but the only effect of overrunning this limit is that new records beyond the limit overwrite the oldest records. When these records are reported, the ones that still exist are submitted normally.

Seiju Sato

unread,
Apr 29, 2023, 12:45:51 PM4/29/23
to Firebase Google Group
Hi Joe,

Thank you for your answer.

My question was more about whether our custom logs can overwhelm Firebase capacity.
I found the document says Firebase Crashlytics SDK keeps only 8 errors in a session.


So I think there is rate-limiting feature and there should be no concern about overloading.

Thank you so much for your reply and appreciate Firebase community cooperation.

Seiju

Reply all
Reply to author
Forward
0 new messages