How to avoid avoid high-cardinality custom dimensions when sending error message as parameters

205 views
Skip to first unread message

Stéphane Archer

unread,
Oct 22, 2023, 10:35:30 AM10/22/23
to Firebase Google Group
Hi,

I'm new to Firebase analytics.

I can see that when creating a custom event you need to add Custom dimensions and metrics for your parameters but you also need to avoid high-cardinality custom dimensions.

One of my events tracks an error that some of my users have for different reasons.
I send as parameters the error message sent by a Dart function when this error is detected.
I think this error message can have a lot of different values because it can contain path information unique to the user for example.
What should I do in that case?
Create a custom dimension anyway? What would be the downside of doing this?
Or is there something more appropriate?

Best regards

Stéphane Archer

Joe Spiro

unread,
Oct 31, 2023, 12:12:10 PM10/31/23
to Firebase Google Group
Hello,

As discussed in Google Analytics article on Cardinality, too many unique values for a custom dimension can make "it more likely that a report hits its row limit, causing any data past the limit to be condensed into the (other) row." This makes it more difficult to uniformly analyze your reports either automatically or manually. 

I would advise you not to include those specifics in your event log.

Instead, this looks like a perfect application for Crashlytics, Firebase's purpose-built crash and error reporting framework which both allows for logging of messages with errors and is designed to work best with Google Analytics by supplementing Crashlytics error reports with chronologically collected Google Analytics events from the same session.

There, similar crashes are organized based on the stacktrace of the issue rather than the generated log and issues with a high cardinality of different logs would still be properly collected and organized making them easier for you to investigate and work on.

Reply all
Reply to author
Forward
0 new messages