firebase / firebase-ios-sdk

Firebase SDK for Apple App Development
https://firebase.google.com
Apache License 2.0
5.41k stars 1.42k forks source link

[FR]: Modify custom keys behavior to be consistent with Android #13153

Open luqas11 opened 1 week ago

luqas11 commented 1 week ago

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:

  1. Set key some_attribute with value value1
  2. Send a non-fatal exception with the recordError method
  3. Set key some_attribute with value value2
  4. Send another non-fatal exception with the recordError method
  5. 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

google-oss-bot commented 1 week ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.