FullStory Integration with New Relic Technical Guide - Mobile

Overview

Mobile applications have become increasingly important in your users’ digital experience. However, slow performance and crashes on mobile apps can be daunting for developers to troubleshoot. With New Relic Mobile you can examine these issues and gain visibility into network errors and latency.

Crash reports and trace data in New Relic may translate into a sluggish app experience. However, it’s difficult to really gauge the severity of the user impact. This is where FullStory session replay URLs can help provide a view into the user experiences corresponding to your New Relic data. This additional insight can reduce the time it takes your team to understand and prioritize issues in your mobile applications.

Checkout our partners page here

Learn more about New Relic Distributed Tracing + FullStory, checkout this blog.

Implementations

  • Add FullStory Session URL as New Relic Attribute
    • Add the FullStory Session Replay URL as a session-level attribute and access it anywhere from crash reports to HTTP errors.
    • Extending your MainActivity to implement FSOnReadyListener, and override the onReady method to set a New Relic attribute for the current FullStory Session URL
Android
public class MainActivity extends AppCompatActivity implements FSOnReadyListener {
...
@Override
public void onReady(FSSessionData sessionData) {
booleen success = NewRelic.setAttribute("FSURL", FS.getCurrentSessionURL())"
if(!success) Log.w("MainActivity", Error adding FullStory session URL as New Relic attribute");
}
iOS
class AppDelegate: UIResponder, UIApplicationDelegate, FSDelegate {
    func fullstoryDidStartSession(_ sessionUrl: String) {
        NSLog("FS did start session, Session URL: %@", FS.currentSessionURL ?? "nil")
        NewRelic.setAttribute("FSURL", FS.currentSessionURL ?? "not ready yet")
    }

 

  • The FullStory session URL will show up in the New Relic crash reports:image4.png
  • As well as in the HTTP error reportsimage2.png
  • Get Detailed New Relic data with its FullStory URL via NRQL
    -    Run NRQL against New Relic Event Insights to drill down to any data you are interested in.
          For example, query for any Mobile requests with response time greater than half a second:
SELECT requestPath, responseTime, FSURL 
FROM MobileRequest 
WHERE responseTime > 0.5 SINCE 1 week ago

-   Query result from New Relic Mobile data:image1.png

  • Adding Session Replay Link Header for New Relic Distributed Tracing
    • When troubleshooting distributed systems with New Relic Distributed Tracing, FullStory Session Replay URL adds critical insights into user impacts.
    • To enable FullStory Session Replay URL in New Relic Distributed Tracing: Add “X-FullStory-URL” header to your HTTP requests with FullStory “moment-in-time” Session URL:

Android

Request request = new Request.Builder()
                   .url(urlStr)
                   .header("X-FullStory-URL",
                            FS.getCurrentSessionURL(true) == null ?  "FS session not ready!": 

FS.getCurrentSessionURL(true))
                   .build();
iOS
let url = URL(string: "utl")!
var request = URLRequest(url: url)
request.addValue((FS.currentSessionURL(true) ?? "FS session not ready"), forHTTPHeaderField: "X-FullStory-URL")
let task = URLSession.shared.dataTask(with: request) { data, response, error in
    …
}

 

  • The FullStory Session Replay URL is now attached as a part of the distributed tracing attributesimage3.png

Need to get in touch with us?

The FullStory Team awaits your every question.

Contact us