Add duration of App hang
Problem Statement
When the application freezes, we cannot see whether it freezes forever or for a few seconds or how many seconds it freezes.
Solution Brainstorm
When the application responds again, this is transmitted to the sentry servers and may add a suffix such as "Unfreezed after 5 seconds".
Are you willing to submit a PR?
No response
I like the idea, @barisyild. Thanks for opening the issue.
Our code can't detect precisely how long the app hung, but we can provide an approximation. The major problem to solve is that we immediately report the app hang once our logic detects it because you never know how much time you have left until the OS terminates your app without any notice. We would need to store the app hang event somewhere and wait for it to stop, and then we could add the approximate hang duration. If the app hang never stops and the OS terminates it, we need to read the stored app hang when starting the SDK and mark it as a more severe app hang.
If we persist App Hang information to disk, and the app gets terminated before we can send the event, we can use this information to elevate issue severity.
This is a duplicate of https://github.com/getsentry/sentry-cocoa/issues/2216.