Analyze network requests using MobileRequest event data

Monitoring HTTP and network requests gives you insight into how your app is performing and provides data that can help you improve your app. To find HTTP and network requests and errors, you can view them in the New Relic Mobile UI or query MobileRequest and MobileRequestError events in Insights.

You do not need a paid Insights subscription to query these events. However, the amount of data you have access to varies based on the data retention in your Mobile or Insights subscription.

Enable MobileRequest for earlier versions of iOS and Android

MobileRequest data is enabled by default for:

For earlier versions, starting with Android version 5.14.0 or iOS version 5.14.0, you must enable the feature. Upgrade to the latest Android or iOS version, or add the following feature flag to your app, before the New Relic start call:

Enable for Android

Place the feature flag before the start call in the onCreate method of the MainActivity class.

NewRelic.enableFeature(FeatureFlag.NetworkRequests);
NewRelic.withApplicationToken("NEW_RELIC_TOKEN").start(this.getApplication());
Enable for iOS

Place the feature flag before the start call which should be the first line of didFinishLaunchingWithOptions method.

Objective-C

[NewRelic enableFeatures:NRFeatureFlag_NetworkRequestEvents]
[NewRelic startWithApplicationToken:@"NEW_RELIC_TOKEN"]

Swift

NewRelic.enableFeatures(NRMAFeatureFlags.NRFeatureFlag_NetworkRequestEvents)
NewRelic.start(withApplicationToken:"NEW_RELIC_TOKEN")

Query HTTP and network requests in Insights

To create custom dashboards for HTTP and network requests in New Relic Insights, run queries using the following events and attributes:

View HTTP and network requests in Mobile

To explore MobileRequest and MobileRequestError data in the UI, go to the following pages in New Relic Mobile:

Page What you can do here
Mobile crash event trail The Mobile crash event trail shows you the events leading up to a crash of a mobile app, based on your subscription level's data retention policy. These events can help you diagnose the cause of the crash.
HTTP requests The HTTP requests page includes charts for your top five domains by response time and average throughput.
Network Errors The Network errors page helps you to better understand HTTP errors and network failures associated with your mobile app and to connect errors to services that are causing issues.

Access to this depends on your subscription level.

For more help

Recommendations for learning more: