Search code examples
iosfirebasereact-nativefirebase-performance

Are requests made by React Native Fetch API captured by Firebase Performance Monitoring?


I installed Firebase Performance Monitoring to my React Native iOS project 2 days ago. Yesterday and today I looked into Network Requests tab in Firebase Console. Only few requests from graph.facebook.com, googleapis.com, and google.com/gcm appeared. None of API requests made by Fetch API in React Native code was displayed at all.

The installation I made followed step 1-3 in https://firebase.google.com/docs/perf-mon/get-started-ios. Here are list of installed Pods from the command pod install:

Using Alamofire (4.5.1)
Using CocoaLumberjack (3.3.0)
Using FLAnimatedImage (1.0.12)
Using Firebase (4.8.0)
Using FirebaseAnalytics (4.0.5)
Using FirebaseCore (4.0.13)
Using FirebaseInstanceID (2.0.8)
Using FirebaseMessaging (2.0.8)
Using FirebasePerformance (1.1.0)
Using FirebaseSwizzlingUtilities (1.0.0)
Using GTMSessionFetcher (1.1.12)
Using GoogleToolboxForMac (2.1.3)
Using Kingfisher (4.2.0)
Using NYTPhotoViewer (1.3.0)
Using Protobuf (3.5.0)
Using SVGKit (2.0.1)
Using nanopb (0.3.8)

I made around 50 requests in total from my app and 2 days has passed since then. Was that enough for the requests to be displayed? Is fetch API in React Native not supported by Performance Monitoring or is there any extra step required to make it work?


Solution

  • After 2 days passed, requests finally started to appear in the console (even they hadn't been categorized). So here are answers to my questions:

    Q: Are requests made by React Native Fetch API captured by Firebase Performance Monitoring? A: Yes

    Q: I made around 50 requests in total from my app and 2 days has passed since then. Was that enough for the requests to be displayed?

    A: Might not enough. I think I started seeing requests after 100+ samples.

    Q: Is fetch API in React Native not supported by Performance Monitoring or is there any extra step required to make it work?

    A: Performance Monitoring does support fetch API. No extra step required. The only things required are enough time passed and enough samples collected.