Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[performance]: Requests from Transistor SDK are not been automatically intercepted #12655

Open
1 task done
danielgomezrico opened this issue Apr 16, 2024 · 2 comments
Open
1 task done
Labels
blocked: firebase-sdk platform: android Issues / PRs which are specifically for Android. plugin: performance type: bug Something isn't working

Comments

@danielgomezrico
Copy link

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Performance

Which platforms are affected?

Android, iOS

Description

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:

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

Expected

I want to track this requests with Firebase performance because GPS tracking is a central feature of my app, and I am not able to do it.

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.

Reproducing the issue

Take a look at this project: 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.

Firebase Core version

2.27.1

Flutter Version

3.16.4

Relevant Log Output

No response

Flutter dependencies

Expand Flutter dependencies snippet
Dart SDK 3.2.3
Flutter SDK 3.16.4
transistorsdk_and_firebase_performance 1.0.0+1

dependencies:
- cupertino_icons 1.0.6
- firebase_core 2.26.0 [firebase_core_platform_interface firebase_core_web flutter meta]
- firebase_performance 0.9.3+16 [firebase_core firebase_core_platform_interface firebase_performance_platform_interface firebase_performance_web flutter]
- flutter 0.0.0 [characters collection material_color_utilities meta vector_math web sky_engine]
- flutter_background_geolocation 4.14.0 [flutter collection background_fetch]

dev dependencies:
- flutter_lints 2.0.3 [lints]
- flutter_test 0.0.0 [flutter test_api matcher path fake_async clock stack_trace vector_math async boolean_selector characters collection material_color_utilities meta source_span stream_channel string_scanner term_glyph web]

transitive dependencies:
- _flutterfire_internals 1.3.24 [collection firebase_core firebase_core_platform_interface flutter meta]
- async 2.11.0 [collection meta]
- background_fetch 1.2.4 [flutter]
- boolean_selector 2.1.1 [source_span string_scanner]
- characters 1.3.0
- clock 1.1.1
- collection 1.18.0
- fake_async 1.3.1 [clock collection]
- firebase_core_platform_interface 5.0.0 [collection flutter flutter_test meta plugin_platform_interface]
- firebase_core_web 2.11.5 [firebase_core_platform_interface flutter flutter_web_plugins js meta web]
- firebase_performance_platform_interface 0.1.4+24 [_flutterfire_internals firebase_core flutter plugin_platform_interface]
- firebase_performance_web 0.1.4+24 [_flutterfire_internals firebase_core firebase_core_web firebase_performance_platform_interface flutter flutter_web_plugins js]
- flutter_web_plugins 0.0.0 [flutter characters collection material_color_utilities meta vector_math web]
- js 0.6.7 [meta]
- lints 2.1.1
- matcher 0.12.16 [async meta stack_trace term_glyph test_api]
- material_color_utilities 0.5.0 [collection]
- meta 1.10.0
- path 1.8.3
- plugin_platform_interface 2.1.8 [meta]
- sky_engine 0.0.99
- source_span 1.10.0 [collection path term_glyph]
- stack_trace 1.11.1 [path]
- stream_channel 2.1.2 [async]
- string_scanner 1.2.0 [source_span]
- term_glyph 1.2.1
- test_api 0.6.1 [async boolean_selector collection meta source_span stack_trace stream_channel string_scanner term_glyph]
- vector_math 2.1.4
- web 0.3.0

Additional context and comments

I hope you could help me with this, It's pretty frustrating to have a core part of your app without a proper monitoring tool checking it.

@russellwheatley
Copy link
Member

Hey @danielgomezrico - Firebase performance should automatically intercept the requests. This is at the level of the firebase-android-sdk which FlutterFire is a thin wrapper around. There isn't anything we can do to fix this on FlutterFire. Ideally, you could find a way to mimic the behaviour on a barebones android app and open an issue on firebase android repo. You could try and open an issue without a reproduction, but it would fall down the pecking order of things to fix.

One thing I would note is on the repo, you have a log on the README:

03-08 01:23:25.951 11347 11463 W FirebasePerformance: Unable to process the PerfMetric (network request trace: http://myserver.com/gps/fake (responseCode: UNKNOWN, responseTime: 6031.912ms)) due to missing or invalid values. See earlier log statements for additional information on the specific missing/invalid values.

It's interesting in the sense that it wasn't processed 🤔 . I wonder if something similar is happening with other Transistor SDK requests that stop it from being logged. Might be worth investigating.

@russellwheatley russellwheatley added blocked: customer-response Waiting for customer response, e.g. more information was requested. plugin: performance platform: android Issues / PRs which are specifically for Android. Needs Attention This issue needs maintainer attention. and removed Needs Attention This issue needs maintainer attention. labels Apr 17, 2024
@danielgomezrico
Copy link
Author

danielgomezrico commented Apr 17, 2024

Thanks @russellwheatley, I will open the issue there!

That log does not even appear for the requests done by the library, but it's still interesting to know why it says that

@google-oss-bot google-oss-bot removed the blocked: customer-response Waiting for customer response, e.g. more information was requested. label Apr 17, 2024
@russellwheatley russellwheatley added blocked: firebase-sdk and removed Needs Attention This issue needs maintainer attention. labels Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked: firebase-sdk platform: android Issues / PRs which are specifically for Android. plugin: performance type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants