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

SentryMinidump: native crash report does not contain expected scope / context if a beforeSend function is supplied #481

Closed
6 of 7 tasks
bowswung opened this issue May 5, 2022 · 1 comment · Fixed by #484

Comments

@bowswung
Copy link

bowswung commented May 5, 2022

Versions + Platform

  • SDK version - @sentry/electron@v3.0.7
  • Electron version - electron@v16.0.10
  • Platform - Windows

Description

As in title - if you supply a beforeSend function then the default SentryMinidump integration will not correctly fill in the scope on the event when sending a crash report.

This may be intentional, but I couldn't find docs stating this. The problematic line is this one - https://github.com/getsentry/sentry-electron/blob/master/src/main/integrations/sentry-minidump/index.ts#L234

which instead of giving the beforeSend function the newEvent that has been filled with scope, it passes the original event.

Fixing should be trivially to pass newEvent to beforeSend (we have patched this in locally and it seems to be working in the way we expect).

@timfish
Copy link
Collaborator

timfish commented May 5, 2022

Thank you for reporting, I'll take a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants