-
-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Finish and capture transaction/span bound to the Scope in case of a fatal crash #2306
Comments
At the moment, I can think of two ways to achieve this. Option AIn case of a fatal crash, we could call into ObjC to finish the ongoing transactions after SentryCrash has written the crash report to disk. We already use this approach for screenshots and view hierarchy, but it wouldn't work for all types of crashes. This would be the best effort approach. sentry-cocoa/Sources/SentryCrash/Recording/SentryCrashC.c Lines 111 to 117 in 58f558d
Option BTo make this work for all types of crashes, we would need to sync the transaction from ObjC to C memory and store it alongside a crash report. This approach is similar to syncing the scope data to SentryCrash. sentry-cocoa/Sources/Sentry/include/SentryCrashScopeObserver.h Lines 6 to 19 in 58f558d
This approach would add some overhead, as every change to a span or transaction would trigger a sync to c memory. To keep this performant a fine-grained sync is a must, which only syncs the current change of a span or transaction to SentryCrash, instead of the whole transaction. |
I believe this is an edge case that don't worth doing option B. |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
Description
For now the transaction gets lost in case of a fatal crash. We should finish it with an appropriate status before capturing the exception, if possible.
See getsentry/team-mobile#62
The text was updated successfully, but these errors were encountered: