firebase-android-sdk icon indicating copy to clipboard operation
firebase-android-sdk copied to clipboard

Requests from Transistor SDK are not been automatically intercepted

Open danielgomezrico opened this issue 1 month ago • 5 comments

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: Im using flutter 3.16.4 on Intellij
  • Firebase Component: Performance Monitor
  • Component version: firebase_performance: 0.9.4+4

[REQUIRED] Step 3: Describe the problem

Hi

I'm using a library to monitor GPS locations called transistor. This library has a native implementation on Android and iOS from which does HTTP requests on the native side every x time.

I'm reporting this because the transistor SDK requests are not been caught by Firebase performance:

  • I spoke with the library owner, and he says he is using Ok HTTP: https://github.com/transistorsoft/flutter_background_geolocation/issues/1243
  • The network debugger on android studio does see the requests. I can see they are being done on the native side of android.

The only way I found is listening to the HTTP request events done by the transistor SDK, but| I lose the request time and payload size with that.

I already spoke with Firebase Support with someone named Amuel, and told me that its better to open an issue so that this issue is been taken this way and not via support, not sure why.

I don't understand what is happening since the Firebase performance is already listening to other requests I do on the flutter side but not those done by the transistor SDK.

I'm creating this issue here because the flutter team says their library is only a jump between this one and flutter in: https://github.com/firebase/flutterfire/issues/12655#issuecomment-2060840004

Steps to reproduce:

I made a sample: https://github.com/danielgomezrico/transistor-sdk-and-firebase-performance-error-example

It uses:

  • transistor SDK
  • firebase performance monitoring
    • It is able to track the requests been done in the native android side, I wrote an activity that does requests, but the ones done by the transistor SDK are not.

danielgomezrico avatar May 14 '24 16:05 danielgomezrico

Hi @danielgomezrico, thank you for reaching out. I was able to reproduce the issue. Per checking, I can confirm that the requests are using OkHttp.

Screenshot 2024-05-16 at 5 00 44 AM

You mentioned that you have other requests done on the flutter side, do you mean that you have other network request on the flutter and they are traced? or do you mean the automatically collected data by Firebase Performance?

I'm thinking, if it's possible that there is a missing configuration in OkHttpClient so the request are not being traced by Firebase Performance. I'll notify our engineers about this and see what we can do here.

lehcar09 avatar May 16 '24 18:05 lehcar09

These requests are being tracked fine:

  1. Requests done from the flutter side
  2. OkHTTP Requests I do from the native android side directly in the activity of the sample I shared.

These are not: 3. All requests done by this library, that are done in the native android side and also using OkHTTP

This seems confusing to me because requests on 2. are being tracked automatically but 3. are not, and in theory they use the same thing 🤔

Does that answer your question? @lehcar09

danielgomezrico avatar May 16 '24 19:05 danielgomezrico