Relic Solution: Why is there no data reporting in Mobile HTTP requests page?

I usually see some people ask why the HTTP requests are not reporting or that some of the HTTP requests are missing. In this post, I’ll go through some basic troubleshooting steps and hope it can help most of the cases.

The first thing I would check is which Network library is used to make the HTTP requests. And then confirm if the library is supported by the New Relic Mobile SDK by default. The compatibility can be found in the below docs:

Android: Android agent compatibility and requirements | New Relic Documentation

iOS: iOS agent compatibility and requirements | New Relic Documentation


If a supported Network library is used, but the HTTP requests are still not reporting, I would check:

  1. Which version of the New Relic Mobile agent is used? There’re always new versions of the library coming out and thus the new instrumentation may need to be added to the new version of the New Relic agent. It’s always a good idea to keep the New Relic agent updated to experience the new features and improvements. Check out our release notes for the details:

    Android: Android agent release notes | New Relic Documentation

    iOS: iOS agent release notes | New Relic Documentation

  2. For Android, if you are using Proguard, there’s an extra configuration required which is to keep the Network library in the Proguard config file. Without this, the New Relic Android agent cannot see this library and thus cannot instrument the requests made by this library. The details of the configuration can be found in the following doc: Configure ProGuard or DexGuard for Android apps | New Relic Documentation

  3. Make sure the New Relic Mobile agent is initialized before the Network library.
    For iOS, the New Relic iOS agent requires to be initialized before the Network library to be able to instrument the library. We recommend initializing the agent at the top of “didFinishLaunchingWithOptions” which is usually before other libraries are initialized. But if you are using any service managers that may initialize the Network libraries before New Relic, you’ll need to adjust this and make sure New Relic is initialized before them.

    For Android, the agent needs to be initialized in the onCreate method in the Default Activity.
    Install Android apps with Gradle and Android Studio | New Relic Documentation


If an unsupported library is used, you can use our Mobile APIs to record custom HTTP requests manually. Below docs are described more details about how to implement this.

Android: Android SDK API guide | New Relic Documentation

iOS: iOS SDK API guide | New Relic Documentation


If you are using WebView, the requests should be reported for iOS but not for Android. Check out the below post for instrumenting WebView in Android.

2 Likes

I was able to see data on Legacy requests Page but couldn’t able to see on default HTTP Requests Page. In default HTTP Requests Page I am getting a message to enable NetworkRequests Feature Flag (even if it is already enabled)


1 Like