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

Report ANR event that is detect by sentry has no user infos #824

Closed
3 tasks done
VictorWangRC opened this issue Feb 2, 2024 · 4 comments
Closed
3 tasks done

Report ANR event that is detect by sentry has no user infos #824

VictorWangRC opened this issue Feb 2, 2024 · 4 comments

Comments

@VictorWangRC
Copy link

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/node

SDK Version

4.17.0

Framework Version

No response

Link to Sentry event

https://jupiter-ct.sentry.io/issues/4892881997/?project=1428302&query=&referrer=project-issue-stream&statsPeriod=1h

SDK Setup

Sentry.init({
dsn: sentryUrl,
debug: debugMode,
maxValueLength: MAX_VALUE_LENGTH,
release: releaseVersion,
initialScope: this._sentryInitialScope,
...
});

Sentry.enableMainProcessAnrDetection({captureStackTrace: true});

Steps to Reproduce

I use Electron sdk of Sentry, on version 4.17.0
and I set userInfo by
Sentry.configureScope((scope) => {
scope.setUser(sentryUserInfo); // for EU Privacy, update email to Account ID
...
});
while login success.

And reproduce steps:

  1. I open ANR detect by Sentry.enableMainProcessAnrDetection({captureStackTrace: true });
  2. I mock a ANR on main process;
  3. I find ANR event, but this event has no user info.

And I mock other sentry report not anr, the report on Sentry.io has userinfos, just ANR Event

Expected Result

ANR event should has user Info

Actual Result

There is no user info

@Lms24
Copy link
Member

Lms24 commented Feb 2, 2024

Hey @VictorWangRC thanks for writing in!

@timfish would you mind taking a look at this?

@AbhiPrasad AbhiPrasad transferred this issue from getsentry/sentry-javascript Feb 2, 2024
@timfish
Copy link
Collaborator

timfish commented Feb 15, 2024

Currently there is no scope synchronization to the ANR process which includes user/tags/extra.

I've opened an issue to track this work in the JavaScript repository since that is where this code lives:
getsentry/sentry-javascript#10668

@timfish
Copy link
Collaborator

timfish commented Apr 3, 2024

The next v7 release will fix this but you should use the anrIntegration as enableMainProcessAnrDetection has been deprecated:

Sentry.init({
  dsn: '__DSN__',
  integrations: [Sentry.anrIntegration|({captureStackTrace: true})]
});

@timfish
Copy link
Collaborator

timfish commented May 3, 2024

This was fixed a few releases ago. It's worth noting that if the event loop remains blocked for more than 5 seconds after ANR is detected, we give up fetching the context.

@timfish timfish closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants