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

fix(mobile): post-release fixes to ANR doc #17861

Merged
merged 9 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ import mobileAnrSettingToggle from 'images/mobile_screenshot-crop_anr-setting-to

In Android mobile apps, [Application Not Responding (ANR) errors](https://developer.android.com/topic/performance/vitals/anr) 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 in New Relic [#anr-reporting]
## How ANR errors are reported to New Relic [#anr-reporting]

Our Android agent reports ANR errors as [`MobileApplicationExit`](/attribute-dictionary/?event=mobileApplicationExit) events, which leverage Android’s [`ApplicationExitInfo` API](https://developer.android.com/reference/android/app/ApplicationExitInfo) 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.
By default, the Android agent reports ANR errors as [`MobileApplicationExit`](/attribute-dictionary/?event=MobileApplicationExit) events, which leverage Android’s [`ApplicationExitInfo` API](https://developer.android.com/reference/android/app/ApplicationExitInfo) 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.

<Callout variant="important">
### Understanding ANR discrepancies between New Relic and Google Play Console [#new-relic-vs-google-play]

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:
Expand All @@ -40,7 +39,6 @@ You might encounter variations in ANR counts and rates between New Relic and Goo
* Google Play Console reports exclusively from certified devices with apps downloaded through the Play Store.

For more information, see the [Google Play documentation](https://developer.android.com/topic/performance/vitals).
</Callout>

## View ANRs in New Relic [#view-anr-in-new-relic]

Expand All @@ -52,11 +50,12 @@ By default, our Android agent collects and reports ANR errors to New Relic. You
title="ANR UI page"
alt="screenshot of ANR UI page"
src={mobileAnrUiPage}
style="float: left;"
/>

To view the ANR page:

1. Go to <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities)</DNT>.
1. Go to <DNT>**[one.newrelic.com > All capabilities](https://one.newrelic.com/all-capabilities)**</DNT>.
2. Click <DNT>**Mobile**</DNT>.
3. Select an Android app.
4. In the left pane, click <DNT>**ANR**</DNT>.
Expand All @@ -67,8 +66,10 @@ The widgets on the ANR page are based on groups of ANRs. By default, ANRs are gr

<img
title="top occurences chart"
width="50%"
alt="screenshot of top occurences chart"
src={mobileGroupBy}
style="float: left;"
/>

To change how ANRs are grouped (such as device type, app version, or a [custom attribute](/docs/data-apis/custom-data/custom-events/collect-custom-attributes/)), click the <DNT>**Group by**</DNT> and select an attribute from the list. The ANR page will update to show data for the new ANR group.
Expand All @@ -83,6 +84,8 @@ For example, if you released a recent app version, the ANR rate chart shows the
title="anr rate chart"
alt="screenshot of anr rate chart"
src={mobileAnrRateChart}
style="float: left;"
width="60%"
/>

The <DNT>**ANR rate by day**</DNT> chart shows the percentage of unique users that experienced an ANR over time as a percentage of all unique users.
Expand All @@ -97,6 +100,7 @@ The <DNT>**ANR occurrences by importance**</DNT> chart shows the distribution of
title="anr occurrences by importance"
alt="screenshot of anrs by importance"
src={mobileAnrOccurencesbyImportance}
style="float: left;"
/>

### Go deeper with ANR profiles [#anr-profiles]
Expand All @@ -107,10 +111,16 @@ ANR profiles shows the distribution of attributes across all your ANR occurrence
title="anr profiles"
alt="screenshot of anr profiles"
src={mobileAnrProfiles}
style="float: left;"
/>

## Disable ANR monitoring [#disable-anr-monitoring]

<Callout variant="important">
Server-side configuration always take precedence over local agent configuration.
For mobile apps with <100,000 concurrently active devices, it may take up to 10 minutes to apply changes to end-user devices. For apps with >100,000 active devices, it may take several hours.
ally-sassman marked this conversation as resolved.
Show resolved Hide resolved
</Callout>

If you need to disable ANR monitoring:

1. In New Relic, navigate to your mobile app.
Expand All @@ -122,4 +132,5 @@ If you need to disable ANR monitoring:
title="ANR setting toggle"
alt="Screenshot of the ANR setting"
src={mobileAnrSettingToggle}
style="float: left;"
/>
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ Server-side mobile agent configuration provides a mechanism to remotely manage a

The following setting can be currently modified remotely on the **Application** page:
* Application Not Responding (ANR) error tracking (Android only): Enables tracking and reporting of the reasons behind ANR errors. This functionality is enabled by default and requires Android agent 7.4.1 or higher.
<Callout variant="important">
Server-side configuration always take precedence over local agent configuration.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would add this at the end & link it - " For more information about how server-side configuration for mobile works , refer here (link the server side configuration in mobile monitoring settings here)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@silpau-pm This will already be on the settings page (/docs/mobile-monitoring/new-relic-mobile/maintenance/configure-settings-for-mobile-monitoring)

For mobile apps with <100,000 concurrently active devices, it may take up to 10 minutes to apply changes to end-user devices. For apps with >100,000 active devices, it may take several hours.
ally-sassman marked this conversation as resolved.
Show resolved Hide resolved
</Callout>

### Configure from UI [#ui-configuration]

Expand Down
Binary file modified src/images/mobile_screenshot-crop_anr-setting-toggle.webp
Binary file not shown.
4 changes: 2 additions & 2 deletions src/nav/mobile-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ pages:
pages:
- title: Summary page
path: /docs/mobile-monitoring/mobile-monitoring-ui/mobile-app-pages/summary-page
- title: Application Not Responding page
path: /docs/mobile-monitoring/mobile-monitoring-ui/application-not-responding
- title: Logs page
path: /docs/mobile-monitoring/mobile-monitoring-ui/mobile-logs
- title: Interactions page
Expand Down Expand Up @@ -156,6 +154,8 @@ pages:
path: /docs/mobile-monitoring/mobile-monitoring-ui/crashes/handled-exceptions-analyze-trends-prevent-crashes
- title: Troubleshoot unsymbolicated crashes
path: /docs/mobile-monitoring/mobile-monitoring-ui/crashes/find-build-uuids-unsymbolicated-crashes
- title: Application Not Responding errors
path: /docs/mobile-monitoring/mobile-monitoring-ui/application-not-responding
- title: Usage analysis
pages:
- title: Versions analysis
Expand Down
Loading