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

fix(core): fatal events should set session as crashed #15072

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 20, 2025

In the Electron SDK, we have to manually set sessions as crashed when native crashes are encountered:
https://github.com/getsentry/sentry-electron/blob/dabd6daf0c19c2a6f224d1e721eb5d58c3cf61ac/src/main/integrations/sentry-minidump/index.ts#L175

This has the downside that if you return null in beforeSend, the event still impacts the release health crash rate.

I found that this was required because _updateSessionFromEvent in @sentry/core does not consider the Electron native events as a crash or an error because there are no exceptions in the event.

This PR ensures that any event with a fatal level is considered a crash.

@timfish
Copy link
Collaborator Author

timfish commented Jan 20, 2025

I'm also going to backport this to v8!

Copy link
Contributor

github-actions bot commented Jan 20, 2025

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.87 KB +0.03% +6 B 🔺
@sentry/browser - with treeshaking flags 21.55 KB +0.03% +6 B 🔺
@sentry/browser (incl. Tracing) 35.57 KB +0.02% +7 B 🔺
@sentry/browser (incl. Tracing, Replay) 72.38 KB +0.02% +8 B 🔺
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.88 KB +0.02% +9 B 🔺
@sentry/browser (incl. Tracing, Replay with Canvas) 76.64 KB +0.01% +7 B 🔺
@sentry/browser (incl. Tracing, Replay, Feedback) 88.64 KB +0.01% +9 B 🔺
@sentry/browser (incl. Feedback) 39.1 KB +0.02% +6 B 🔺
@sentry/browser (incl. sendFeedback) 27.52 KB +0.03% +7 B 🔺
@sentry/browser (incl. FeedbackAsync) 32.29 KB +0.03% +7 B 🔺
@sentry/react 25.58 KB +0.02% +5 B 🔺
@sentry/react (incl. Tracing) 38.37 KB +0.02% +4 B 🔺
@sentry/vue 26.96 KB +0.01% +2 B 🔺
@sentry/vue (incl. Tracing) 37.32 KB +0.02% +4 B 🔺
@sentry/svelte 23.01 KB +0.03% +6 B 🔺
CDN Bundle 24.28 KB +0.03% +5 B 🔺
CDN Bundle (incl. Tracing) 35.92 KB +0.02% +5 B 🔺
CDN Bundle (incl. Tracing, Replay) 70.55 KB +0.01% +5 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) 75.69 KB +0.02% +9 B 🔺
CDN Bundle - uncompressed 70.85 KB +0.03% +15 B 🔺
CDN Bundle (incl. Tracing) - uncompressed 106.47 KB +0.02% +15 B 🔺
CDN Bundle (incl. Tracing, Replay) - uncompressed 217.3 KB +0.01% +15 B 🔺
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 229.83 KB +0.01% +15 B 🔺
@sentry/nextjs (client) 38.48 KB +0.01% +3 B 🔺
@sentry/sveltekit (client) 36.12 KB +0.01% +1 B 🔺
@sentry/node 161.36 KB +0.01% +8 B 🔺
@sentry/node - without tracing 97.15 KB +0.01% +9 B 🔺
@sentry/aws-serverless 127.04 KB +0.01% +4 B 🔺

View base workflow run

@timfish timfish marked this pull request as draft January 20, 2025 12:04
@timfish timfish marked this pull request as ready for review January 20, 2025 12:06
@AbhiPrasad AbhiPrasad merged commit 7404fdc into develop Jan 20, 2025
152 checks passed
@AbhiPrasad AbhiPrasad deleted the timfish/fix/fatal-level-session-crashed branch January 20, 2025 15:38
AbhiPrasad pushed a commit that referenced this pull request Jan 20, 2025
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.

3 participants