GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — ref(android): Extract ANR culprit exceptions into AnrCulpritEventHelper by markushi · Pull Request #6593 · getsentry/sentry-java

Conversation

@markushi

@markushi markushi commented Nov 12, 2026

Copy link
Copy Markdown
Member

📜 Description

Moves the code that turns an ANR profile culprit into event exceptions out of ApplicationExitInfoEventProcessor into a new AnrCulpritEventHelper:

  • toSentryExceptions(culprit, mechanism) builds the ApplicationNotResponding exception from the culprit stack.
  • hasOnlySystemFrames(exceptions) decides whether an ANR gets the static system-frames fingerprint.

The fatal ANR event does not change.

💡 Motivation and Context

Prep work for non-fatal ANRs. The non-fatal ANR event needs the same culprit exception and fingerprint rule as the fatal one, so both event producers will share this helper.

💚 How did you test it?

Added AnrCulpritEventHelperTest. The existing ApplicationExitInfoEventProcessorTest and AnrV2IntegrationTest pass without changes.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

The non-fatal ANR integration will use this helper.

#skip-changelog

🤖 Generated with Claude Code

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
markushi added 3 commits November 12, 2026 10:38
@markushi
ref(android): Extract ANR culprit exceptions into AnrCulpritEventHelper
302ba2a
@markushi
ref(android): Trim a redundant Javadoc sentence in AnrCulpritEventHelper
2887ad2
@markushi
ref(android): Rename AnrCulpritEventHelper methods and take exception…
a6bda16
…s directly
@sentry

sentry Bot commented Nov 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.64.0 (1) release

⚙️ sentry-android Build Distribution Settings

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markushi
ref(android): Move AnrCulpritEventHelper into the anr package
7effbd9
sentry-warden[bot]
sentry-warden Bot reviewed Nov 12, 2026
View reviewed changes
Comment thread sentry-android-core/src/main/java/io/sentry/android/core/ApplicationNotResponding.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread sentry-android-core/src/main/java/io/sentry/android/core/ApplicationNotResponding.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

markushi
markushi commented Nov 12, 2026
View reviewed changes
Comment thread sentry-android-core/src/main/java/io/sentry/android/core/ApplicationNotResponding.java
*/
final class ApplicationNotResponding extends RuntimeException {
@ApiStatus.Internal
public final class ApplicationNotResponding extends RuntimeException {

@markushi markushi Nov 12, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had to change the visibility, otherwise the helper could not have accessed it. Moving this class probably isn't an option, as it's used for captureException() and thus could influence issue grouping.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markushi
markushi marked this pull request as ready for review November 12, 2026 10:55
@markushi
markushi requested review from a team and adinauer as code owners November 12, 2026 10:55
@markushi
markushi requested review from 0xadam-brown and romtsn and removed request for a team November 12, 2026 10:55
@markushi markushi added the sanity-check PR needs a lightweight review for obvious issues label Nov 12, 2026
@markushi
license(android): Complete the ANR-WatchDog attribution for Applicati…
9c363b4
…onNotResponding
0xadam-brown
0xadam-brown approved these changes Nov 12, 2026
View reviewed changes

@0xadam-brown 0xadam-brown left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One quick question in case it's helpful; otherwise lgtm 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread sentry-android-core/src/main/java/io/sentry/android/core/anr/AnrCulpritEventHelper.java
import org.jetbrains.annotations.Nullable;

@ApiStatus.Internal
public final class AnrCulpritEventHelper {

@0xadam-brown 0xadam-brown Nov 12, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I imagine I'll learn more as more PRs emerge, but (for now) it looks like there's a lot of overlap between this class an the existing AnrCulpritIdentifier. Just making sure we don't want to extend the latter instead?

(Happy to defer to you.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sentry-warden sentry-warden[bot] sentry-warden[bot] left review comments
@0xadam-brown 0xadam-brown 0xadam-brown approved these changes
@adinauer adinauer Awaiting requested review from adinauer adinauer is a code owner
@romtsn romtsn Awaiting requested review from romtsn romtsn is a code owner automatically assigned from getsentry/team-mobile-android-sdk

At least 1 approving review is required to merge this pull request.

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

sanity-check PR needs a lightweight review for obvious issues

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@markushi @0xadam-brown
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.