Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Performance Monitoring and Retrofit

I have integrated Firebase Performance Monitoring in one of my projects. In that project, I use Retrofit to manage my network requests.

Sadly, none of the requests made through Retrofit are visible in the "Network Requests" tab of Firebase Performance.

Here are the only things I see :

Firebase Performance Monitoring

Can somebody tell me what I need to do in order to see my Retrofit-managed network requests in Firebase Performance?

Thank you

like image 798
Valentin Avatar asked Jan 04 '18 22:01

Valentin


People also ask

What is Performance Monitoring Firebase?

Firebase Performance Monitoring is a service that helps you to gain insight into the performance characteristics of your Apple, Android, and web apps. You use the Performance Monitoring SDK to collect performance data from your app, then review and analyze that data in the Firebase console.

Is firebase performance monitoring free?

Is Firebase Performance Monitoring free? Yes, the service is free and available under the Spark and Blaze plans.

What is percentile in firebase?

If you select a percentile of 90% and a time range of Last 7 days, then the metric's value will be the 90th percentile of collected data from the most recent day, and the percentage change will be the change since 7 days prior.

What is the performance monitoring?

Performance monitoring involves the measurement of performance over time against indicators of performance or key performance indicators (KPIs). 28. Performance benchmarking is a complex activity requiring comparable, consistent, and validated data to be meaningful.


1 Answers

Just started reading up on this - sounds interesting. Check that;

  1. You are using a supported OkHttp RE:

Performance Monitoring only supports monitoring HTTP/S network requests made using the OkHttp HTTP client version 3.x.x.

Retrofit 1, the original can use OkHttp 1 or 2 if I remember correctly. However, Retrofit 2 enforces 3.x.x+. Check which is pulled in by running ./gradlew <insert-module-name>:dependencies

  1. You've waited for 12hrs (Looking at the date-times I think you're good there!)
  2. If (1) and (2) don't help - then debug using the approach described in the documentation and adding this to the relevant AndroidManifest.xml;

    < meta-data android:name="firebase_performance_logcat_enabled" android:value="true" / >

...dumps what's going on to logcat by the sounds of it. Report back! My bets are on (1).

like image 98
BrantApps Avatar answered Sep 27 '22 17:09

BrantApps