Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using New Relic in Xamarin to track web service requests

I`m trying to monitor iOs app net activity by using New Relic. App writen in Xamarin and use web-service to synchronize data with server. I add New Relic to project and start to monitor app, but when I watch app activity, it shows there one active device and no http activity at all. So, can New Relic in general track web-service requests and if it can, where I might have a mistake? Thanks for any help!

like image 501
SDmitry Avatar asked Nov 01 '22 13:11

SDmitry


2 Answers

New Relic's mobile agent does not work with Xamarin at this time. When first released, the Android and iOS agent only worked with natively developed applications. Since then, New Relic has added support for Titanium Studio and hopes to add more cross-platform development environments. Watch https://docs.newrelic.com/docs/mobile-apps/ for new platforms to be added.

like image 127
Jordan Kasper Avatar answered Nov 15 '22 11:11

Jordan Kasper


There's not many technical details on New Relic web site on how they are doing their monitoring for mobile devices. My guess is that they monitor some specific high-level API of iOS.

Xamarin.iOS BCL (the .NET class libraries) includes it's own network stack which, in most cases, will only use lower-level networking API of iOS. That's what being used to support .NET web services. If those API are not monitored then you won't see them inside their reports.

IOW it might be a limitation of the New Relic toolkit, not a mistake from your side.

You could easily confirm this since Xamarin.iOS also supports the high-level API (inside monotouch.dll). Try writing a small sample that use NSUrl* types and see if the networking access is being logged as expected.

like image 42
poupou Avatar answered Nov 15 '22 11:11

poupou