Skip to content

ANR only sends one event #11160

Closed
Closed

Description

@timfish

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

Activity

  1. joaoviana commented on Jun 5, 2024

    @joaoviana

    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?

  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jun 5, 2024
  3. timfish commented on Jun 5, 2024

    @timfish
    CollaboratorAuthor

    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 context and send the event without it.

  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jun 5, 2024
  5. abustany commented on Nov 21, 2024

    @abustany

    We're using ANR (with a relatively low threshold of 500ms) to diagnose event loop lags in our NodeJS server, and often get an ANR event during startup while Node is compiling stuff... Which means we never get an ANR event afterwards during the actual event loop stall events 😅 So lifting this limitation (or alternatively adding an option to only start the pings after a given duration) would be super useful!

  6. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Nov 21, 2024
  7. self-assigned this
    on Nov 21, 2024
  8. timfish commented on Nov 22, 2024

    @timfish
    CollaboratorAuthor

    Thanks for the ping. I'll look into this next week!

  9. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions