• /
  • EnglishEspañol日本語한국어Português
  • Inicia sesiónComenzar ahora

Application not responding: Track and analyze ANR errors

In Android mobile apps, Application Not Responding (ANR) errors are triggered when the main UI thread of an application is blocked for more than five seconds. ANR errors can be caused by various factors, such as network calls, complex calculations, or resource contention. By monitoring their frequency and occurrence patterns, you gain valuable insights into your app's overall stability and user experience.

How ANR errors are reported to New Relic

By default, the Android agent reports ANR errors as MobileApplicationExit events, which leverage Android’s ApplicationExitInfo API to monitor and report on the different causes for app termination. The agent reads the ApplicationExitInfo API on the next app launch and asynchronously sends MobileApplicationExit events to New Relic for each app exit in the history.

Understanding ANR discrepancies between New Relic and Google Play Console

You might encounter variations in ANR counts and rates between New Relic and Google Play Console. This is due to differences in data collection methods:

  • Android version coverage:
    • New Relic focuses on ANRs from devices running Android 11 or higher.
    • Google Play Console captures ANRs across all Android versions.
  • Device and app scope:
    • New Relic reports from devices with the New Relic agent installed, regardless of app source.
    • Google Play Console reports exclusively from certified devices with apps downloaded through the Play Store.

For more information, see the Google Play documentation.

View ANRs in New Relic

By default, our Android agent collects and reports ANR errors to New Relic. You can find ANR data in two places:

  • On the Summary page, there's a widget called ANR rate displaying the percentage of errors.
  • On the ANR page, where you can view a breakdown of error rates, groups of users affected, and attribute details.
screenshot of ANR UI page

To view the ANR page:

  1. Go to one.newrelic.com > All capabilities.
  2. Click Mobile.
  3. Select an Android app.
  4. In the left pane, click ANR.

Filter by ANR groups

The widgets on the ANR page are based on groups of ANRs. By default, ANRs are grouped by the description attribute.

screenshot of top occurences chart

To change how ANRs are grouped (such as device type, app version, or a custom attribute), click the Group by and select an attribute from the list. The ANR page will update to show data for the new ANR group.

Monitor the ANR rate

The ANR rate chart to see at a glance if there are any unexpected spikes, dips or patterns with ANRs in general.

For example, if you released a recent app version, the ANR rate chart shows the percentage of sessions that experienced errors over time as a percentage of all sessions, broken out by app version. The average ANR session percent is shown in the upper right.

screenshot of anr rate chart

The ANR rate by day chart shows the percentage of unique users that experienced an ANR over time as a percentage of all unique users.

Note: Regardless of the time selected, this chart will show the average ANR rate for the last 28 days.

View ANR occurences by importance

The ANR occurrences by importance chart shows the distribution of ANRs by relative importance of the app’s process before termination due to an ANR. More information about an app’s process importance can be found here.

screenshot of anrs by importance

Go deeper with ANR profiles

ANR profiles shows the distribution of attributes across all your ANR occurrences helping you identify patterns to quickly narrow down and troubleshoot the root-cause.

screenshot of anr profiles

Disable ANR monitoring

Importante

Server-side configuration always take precedence over local agent configuration. For mobile apps with less than 100,000 concurrently active devices, it may take up to 10 minutes to apply changes to end-user devices. For apps with greater than 100,000 active devices, it may take several hours.

If you need to disable ANR monitoring:

  1. In New Relic, navigate to your mobile app.
  2. In the left pane under Settings, click Application.
  3. Toggle Application Not Responding (ANR) off.
  4. Click Save.
Screenshot of the ANR setting
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.