Alamofire: Firebase Performance Monitoring seems not to work

Created on 24 Nov 2017  路  4Comments  路  Source: Alamofire/Alamofire

What did you do?

I integrated Firebase Performance Monitoring in my application;
https://firebase.google.com/docs/perf-mon/get-started-ios

What did you expect to happen?

I expected that all my network calls are monitored and logged in Firebase.

What happened instead?

All network calls where I use Alamofire for, aren't logged.
There are some known issues, it's in beta. But in the list of known issues I don't see something that could cause the problem for al 'Alamofire-calls'. Only the issue about NSUrlSession delegation is a possible cause. But I did a, quick, look in the Alamofire code, but I don't think this can be it.
I'm wondering is someone can explain what could be the problem.

Alamofire Environment

Alamofire version: 4.5.1
Xcode version: 9.1
Swift version: 3.2
Platform(s) running Alamofire: iOS
macOS version running Xcode: 10.13.1

support

All 4 comments

I would suggest opening this issue with Firebase. I have no idea how that framework works, so I have no way of judging whether or not it should be working with Alamofire. I'd think yes, but perhaps there's some interaction with Swift the framework doesn't handle? I really don't know. They should be able to answer such questions.

I have exactly this same question. We recently started adding Firebase analytics to our app, but Alamofire calls are not being monitored, while other http(s) calls are.

Did anyone get around opening this issue with Firebase? Any reference or links we can monitor?

Yes, I got this response from Firebase Support:

Hi Martijn,

Thank you for reaching out.

Apologies, but Alamofire is not something we officially support and I'm not familiar enough with that library to help troubleshoot. Kindly note that we cannot guarantee that these third-party libraries will work properly with Firebase as they are not maintained by the Firebase Engineers.
One thing to check would be to remove Alamofire and try using NSURLSession API and see if the network requests are being logged.

I would recommend that you reach out to a developer community such as Stack Overflow where fellow developers can help you out.

After updating my pods this started to work. An extract from my podfile.lock:

  - Alamofire (4.6.0)
  - AlamofireObjectMapper (5.0.0)
  - Firebase/Core (4.7.0)
  - Firebase/Crash (4.7.0)
  - Firebase/Performance (4.7.0)
  - FirebaseAnalytics (4.0.5)
  - FirebaseCore (4.0.12)
  - FirebaseCrash (2.0.2)
  - FirebaseInstanceID (2.0.7)
  - FirebasePerformance (1.0.7)
  - FirebaseSwizzlingUtilities (1.0.0)
Was this page helpful?
0 / 5 - 0 ratings