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

Sudden spike in the number of sessions per user in newer version of electron sdk #895

Open
3 tasks done
gid-sentry opened this issue Apr 26, 2024 · 9 comments
Open
3 tasks done
Assignees

Comments

@gid-sentry
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Electron SDK Version

4.22.0

Electron Version

27.2.0

What platform are you using?

None

Link to Sentry event

https://jupiter-ct.sentry.io/releases/desktop%4024.2.15%2BRCAppDesktop/?chart=sessionCount&issuesType=unhandled&pageEnd=2024-04-19T11%3A00%3A00&pageStart=2024-04-14T23%3A29%3A35&project=1430058

Steps to Reproduce

Update to sdk version 4.22.0, have max Minidumps per session set to 8.

Expected Result

Same rough number of sessions to users

Actual Result

Significantly more sessions per user

@gid-sentry
Copy link
Author

Does not look like version 4.24 has updates that would affect this functionality as it seems like dependency updates for the javascript sdk + some replay related fixes.

@AlbertInRC
Copy link

Maybe you could check how the sessions were uploaded from a minimum group of users.

@smeubank
Copy link
Member

hi @timfish fyi the init looks something like this, would you mind having a look if anything is suspicious here, I am not familiar with this feature, or why there are 2 variants of minidump 😅

import * as Sentry from "@sentry/electron";

Sentry.init({
  dsn: SENTRY_DSN,
  ….
  integrations: [
    new Sentry.Integrations.MainProcessSession({ sendOnCreate: true }),
    new Sentry.Integrations.ElectronMinidump()
  ],
 …..
});

@timfish
Copy link
Collaborator

timfish commented Apr 29, 2024

That init code looks fine. The ElectronMinidump integrations uses Electrons built in native uploader. It's potentially more reliable but lacks the ability to include full context like our custom uploader in the SentryMinidump integration.

Above, both 4.24 and 4.22.0 are mentioned. Which version worked ok and which version started to cause the issue?

@smeubank
Copy link
Member

After integrating the new Sentry SDK 4.22.0 with the following feature, the Crash Free Sessions rate becomes a lot better than before: [*](#830)

  • generate maximum 10 sentry errors for a single session by default

We find that a minimum # of users will create lots of sessions.  It blocks our sign off for a new release.  Could you pls help us understand why?  Is it because of a single user upload too many sessions?

I think the mention of 4.24 is red herring, when they moved to 4.22 the issue started, and it appears there is no benefit from 4.24

@timfish
Copy link
Collaborator

timfish commented Apr 29, 2024

Assuming they were on 4.21.0 before...

The Electron SDK 4.21.0 to 4.22.0 diff is minimal:
4.21.0...4.22.0

The JavaScript SDK changes from v7.107.0 to v7.109.0 were more extensive but I'm not aware of any changes to sessions:
getsentry/sentry-javascript@7.107.0...7.109.0

@timfish
Copy link
Collaborator

timfish commented May 8, 2024

Did they end up reverting to the previous version or are they still seeing excessive sessions?

@timfish
Copy link
Collaborator

timfish commented Aug 27, 2024

When this issue closes, 5.4.0 will be published to npm. This has a fix for multiple sessions being recorded when there are multiple renderer crashes in a single session. Let us know if this fixes this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

4 participants