Skip to content
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

Capture unfinished transactions on crash #2938

Merged
merged 8 commits into from
Sep 27, 2023

Conversation

romtsn
Copy link
Member

@romtsn romtsn commented Sep 14, 2023

📜 Description

  • Keep on the UncaughtExceptionHint reference if we know there's an active transaction on scope. This transaction will then use the hint to call markFlushed and unblock the main thread once its serialization is done, which happens after the crash has been already serialized

Previously this was possible only if you capture exceptions manually:
image

💡 Motivation and Context

Closes #2316

💚 How did you test it?

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

@github-actions
Copy link
Contributor

github-actions bot commented Sep 15, 2023

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 368.68 ms 433.93 ms 65.25 ms
Size 1.72 MiB 2.26 MiB 547.91 KiB

Previous results on branch: rz/feat/capture-unfinished-transactions

Startup times

Revision Plain With Sentry Diff
44bf90b 370.62 ms 459.12 ms 88.50 ms
42bd05f 321.19 ms 365.20 ms 44.01 ms
6ee2c19 324.79 ms 362.37 ms 37.58 ms

App size

Revision Plain With Sentry Diff
44bf90b 1.72 MiB 2.26 MiB 548.19 KiB
42bd05f 1.72 MiB 2.26 MiB 547.88 KiB
6ee2c19 1.72 MiB 2.26 MiB 547.91 KiB

@romtsn romtsn marked this pull request as ready for review September 18, 2023 15:04
Copy link
Member

@adinauer adinauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there's no problem with the code where I added an assumption this LGTM after giving it a quick pass.

Copy link
Member

@stefanosiano stefanosiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good!

@romtsn romtsn merged commit 72e23fc into feat/7.0.0 Sep 27, 2023
14 of 17 checks passed
@romtsn romtsn deleted the rz/feat/capture-unfinished-transactions branch September 27, 2023 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Finish and capture transaction/span bound to the Scope in case of a fatal crash
4 participants