Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

MobileRequest - duplicate MobileRequest events


#1

NewRelicAgent SDK Version - 6.8.0

Platform - iOS

Seeing doubled up entries in MobileRequest for each request event. Just wondering whether its as expected or something wrong with the configuration options i have enabled.

I could see the same network request captured twice in MobileRequests but with different requestUuid

I have the below flags enabled which are networking related.

NRFeatureFlag_RequestErrorEvents | NRFeatureFlag_NetworkRequestEvents | NRFeatureFlag_NSURLSessionInstrumentation


#2

Hi @arvbhavan

Thanks for reaching out! Hmm, this definitely sounds a bit unexpected so thanks for bringing this to our attention. I want to point out a handful of things here that I hope are beneficial:

  • We have had a few recent releases of our agent, I’m curious to know if this issue persists with our latest agent release.
  • While you’re updating the agent, I’ll note that the two feature flags you’ve referenced shouldn’t be impacting these events - in fact, you shouldn’t need either of these feature flags as they are automatically implemented - including these as feature flags is beneficial should you wish to disable these features.
  • Additionally, can you confirm that you’re instantiating our agent as documented in our installation documents
In your  `AppDelegate.m`  file, add this call as the first line of  `application:didFinishLaunchingWithOptions` , replacing  `APP_TOKEN`  with your [application token](https://docs.newrelic.com/docs/mobile-apps/viewing-your-application-token):

[NewRelic startWithApplicationToken:@"APP_TOKEN"];
  • Finally, I’m curious to know if you’ve been able to capture this duplication with a Charles Proxy log while one of these requests are running? To do this, please direct the test device to use the proxy, and perform calls to the API. This article goes over using Charles Proxy to trace network calls on a mobile device.

I hope this gives you a good place to start; looking forward to hearing back from you on these notes!


#3

Hi @agoldberg - Thanks for your reply.

  • I have checked the new agent releases and does not see any related bug fixes being done around this MobileRequest. I will update and give a try as well.

*I am using the below steps to enable the NewRelic feature flags as we wanted to enable only specific features and the list is as below:
NRFeatureFlag_InteractionTracing | NRFeatureFlag_CrashReporting |
NRFeatureFlag_HandledExceptionEvents | NRFeatureFlag_DefaultInteractions |
NRFeatureFlag_RequestErrorEvents |NRFeatureFlag_NetworkRequestEvents |
NRFeatureFlag_NSURLSessionInstrumentation

// So i disable all the feature flags and then enable only the required ones, followed by startWithApplicationToken with APP_TOKEN
[ NewRelic disableFeatures:[ self allFeatures]];
[ NewRelic enableFeatures:[ self activeFeatures]];
[NewRelic startWithApplicationToken: @“APP_TOKEN”];

and looks like the way of initialisation is as specified in the documentation.

  • I have checked the network logs and there are no duplicate service calls made. In-fact I could see one duplicate event being captured for every API call i make in my app.

#4

Hi @arvbhavan

I appreciate the follow-up information! I think this will require additional information collection and review, specifically around your instrumentation and your Charles logs. Given this, I’m going to migrate this conversation into a ticket. Looking forward to continuing this conversation with you!