Valentin
Valentin

Reputation: 5608

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

Upvotes: 8

Views: 3899

Answers (1)

BrantApps
BrantApps

Reputation: 6452

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).

Upvotes: 11

Related Questions