As we add more features to the iOS agent we want to give you the option of accessing newer features as soon as they become available. We’re now introducing the ability to enable and disable new functionality for the New Relic iOS SDK at your discretion. With this release we are including flags to enable
NSURLSession instrumentation, and more features will soon follow along, so keep an eye out! More detailed documentation is available in the iOS SDK
NewRelic.h header file.
The New Relic iOS Agent now supports instrumentation of
NSURLSession, a new networking framework added in iOS 7.0. As a beta feature you’ll need to manually enable it by calling:
… before you call …
[NewRelic startWithApplicationToken:'Your Token'];.
You’ll now be able to monitor NSURLSession traffic along with NSURLConnection, UIWebView, and ASI frameworks. Just click the “Network” tab for your mobile app and dive into HTTP requests, errors, geography, and carrier data! You can read more about our network monitoring features here.
The new instrumentation of
NSURLSession includes all network traffic dispatched using
NSURLSessionUploadTask with either delegate or block call-back models.
NSURLSessionDownloadTask is not currently instrumented due to the backgrounding nature of this particular
Due to limitations of the framework we had to replace the
NSURLSession delegate at runtime with an
NRURLSessionDelegateBase object, but if you need access to your delegate after the
NSURLSession is created you can still access it via the
realDelegate property of
As always, we’re eager to hear your feedback. If you’d like your favorite 3rd party library instrumented, just let us know over at the Community Forum.