bugsnag / bugsnag-unity

Automatic error reporting for Unity games
https://docs.bugsnag.com/platforms/unity
MIT License
89 stars 31 forks source link

PLAT-11641 handle json serialisation errors and remove payloads #773

Closed richardelms closed 6 months ago

richardelms commented 6 months ago

Goal

Error handling

Sometimes, while flushing the session and event cache, a serialisation error can occur.

This PR improves the handling of those errors. The new setup is as follows:

File writing

It could be possible the the method File.writeAllText is buffered under the hood. So we are now using a file stream to write data and using the method FileStream.Flush to force it to write all at once.

Testing

Covered by existing tests

bugsnagbot commented 6 months ago

Build size impact

Format Size impact of Bugsnag (kB)
IL2CPP APK 2348.56
IL2CPP IPA 1348.39

Generated by :no_entry_sign: Danger