[FR]: Modify custom keys behavior to be consistent with Android
Description
If multiple non fatal reports are sent, and different custom key values are set between them, all the reports have the the values of the last one.
This behavior is not consistent with the Android SDK, where each report is sent with the custom key values set at the moment of calling the recordException method.
For example, if I do the following sequence:
- Set key
some_attributewith valuevalue1 - Send a non-fatal exception with the
recordErrormethod - Set key
some_attributewith valuevalue2 - Send another non-fatal exception with the
recordErrormethod - Restart the app
On iOS, both non-fatal errors are shown in the Crashlytics dashboard with the some_attribute key set to value2.
On Android, the first and the second non-fatal errors are shown in the Crashlytics dashboard with the some_attribute key set to value1 and value2 respectively.
From my perspective, having different behaviors between platforms adds complexity to the error reporting implementations and while doing error analysis. Before the FR, I created an issue about this, including detailed code examples and screenshots. I got the confirmation that the current behavior is intentional, and that I should report it as a feature request.
Is a behavior unification viable?
API Proposal
No response
Firebase Product(s)
Crashlytics
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Any updates on this issue?
This is an expected behaviour and we do realize the discrepancy. An alternative is when logging non-fatal, you can added additional userInfo as extra parameter. UserInfo will attach to custom key values and it is on event base rather on session base. For API reference is here.