Interactions page

New Relic Mobile provides an engine that instruments your application code for Android and iOS apps and monitors your code as it services your user interactions. This is useful for analyzing time-consuming user activities. After you set up the SDK API for your Android or iOS app, you can view detailed information from New Relic Mobile's Interactions page.

Access to this feature depends on your subscription level.

Instrumentation

New Relic Mobile offers SDK APIs to instrument interactions for Android and iOS apps. This includes:

  • Android: Activities, AsyncTask threading, and the performance of database, image loading, JSON parsing, and other common APIs
  • iOS: UIViewControllers, GCD dispatch_async, and the performance of CoreData, UIImage, NSJSON, and other common APIs

For more information, see Working with the Android SDK API and Working with the iOS SDK API.

Viewing the Interactions page

The Interactions page includes breakdown charts of the five most expensive interactions (including code executing on the main thread and code executing on worker threads), plus a list of the slowest traces.

screen mobile interactions.png
rpm.newrelic.com/mobile > (select an app) > App > Interactions: Interactions track synchronous and asynchronous code execution for mobile applications.

To view the Interactions page:

  1. Go to rpm.newrelic.com/mobile > (select an app) > App > Interactions.
  2. To drill down into detailed information, select any interaction, or use any of New Relic's standard user interface functions and page functions.

To go directly to Interactions from the Mobile Apps Overview page, select the Slowest interactions chart's title, or select any interaction to view detailed information.

Viewing breakdown table details

To show the full list of all instrumented methods: From the selected interaction, select the Breakdown table link. If you use custom instrumentation for any of the metrics, the category for the class and method name will indicate custom. For each traced method, the Interactions breakdown table shows:

  • Thread type (foreground or background)
  • Class and method name
  • Percentage of total execution time spent in this method
  • Average number of calls to this method per interaction
  • Overall average execution time of each call to this method
screen mobile interactions details.png
rpm.newrelic.com/mobile > (select an app) > App > Interactions > (select an interaction): Here is an example of the page details for a specific interaction, including the expanded Breakdown table.

Viewing the Interactions timeline

Each interaction trace period records traces until a new interaction begins.

To view the Interactions timeline for your mobile app:

  1. Go to rpm.newrelic.com/mobile > (select an app) > App > Interactions.
  2. From the Slowest traces table, select the Activity or Duration link for the trace.

OR:

  1. Go to rpm.newrelic.com/mobile > (select an app) > App > Interactions > (select an interaction).
  2. From the Slowest traces table, select the Duration link for the trace.

As you mouse over the timeline, information appears for the method underneath, memory used by your application, and any active network requests. The row labels indicate which thread each method is running on. To view a waterfall of execution flow within a method, select a method block.

screen mobile interactions timeline.png
rpm.newrelic.com/mobile > (select an app) > App > Interactions: From the Interactions page or selected interaction, select a record from the Slowest traces section. The timeline shows the interactions of tasks across time in a chart where you can view, scroll, and select to drill down into detailed information.

The Interactions timeline also provides on-device metrics to help you gain insight into your app's device level data. The usage metrics show how your app is interacting with your end users's devices. In addition to operating system metrics, the usage metrics include database, CPU, and memory.

  • To view the on-device usage metrics, mouse over the timeline.
  • To drill down into detailed information, select any location on the timeline.
  • To help provide context for the data, select the Previous interaction link.

For more help

Additional documentation resources include:

  • Working with the Android SDK API (installing and instrumenting your code to start interaction traces, track networking from libraries not already instrumented, and record custom metrics)
  • Working with the iOS SDK API (installing and instrumenting your code to start interaction traces, track networking from libraries not already instrumented, and record custom metrics)
  • Mobile Apps Overview page (features and functions available from your mobile app's Overview page, which shows the collected data as a set of charts)
  • New Relic blog post (additional information and examples about using the Interactions feature)

Recommendations for learning more: