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

ANR only sends one event #11160

Open
timfish opened this issue Mar 18, 2024 · 2 comments
Open

ANR only sends one event #11160

timfish opened this issue Mar 18, 2024 · 2 comments
Labels
Feature: Errors Package: node Issues related to the Sentry Node SDK Type: Improvement

Comments

@timfish
Copy link
Collaborator

timfish commented Mar 18, 2024

Problem Statement

Currently the ANR feature only sends a single event and exits.

Solution Brainstorm

We chose to do this because:

  • The ANR worker does not run a full Sentry client so there's no Dedupe integration
  • If ANR has been detected, the event loop is getting blocked for long periods so we shouldn't expend more CPU time than we need to
@joaoviana
Copy link

joaoviana commented Jun 5, 2024

Hey @timfish / Sentry team! Could you clarify this part please? "Currently the ANR feature only sends a single event and exits."
We run a multi-tenant distribution of an app that uses Sentry.
If an ANR event gets capture, and if it's only sent once, what happens for other users? Is it per deployment or per session?

@timfish
Copy link
Collaborator Author

timfish commented Jun 5, 2024

Is it per deployment or per session?

It's currently one event per Node process. I can add an options to lift this limit but there's no easy way to have this per session.

We fetch context (scope, user, tags, etc) from the app thread but we can only do that if it becomes unblocked. If the event loops blocks for more than 5 seconds we give up fetching the extra contact and send the event without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature: Errors Package: node Issues related to the Sentry Node SDK Type: Improvement
Projects
Status: No status
Development

No branches or pull requests

3 participants