Network requests not captured with Flutter / Firebase-performance

787

Solution 1

I wrote a flutter package that allows capturing network requests in case you are using Dio:

final dio = Dio();
final performanceInterceptor = DioFirebasePerfomanceInterceptor();
dio.interceptors.add(performanceInterceptor);

The package is available here: https://pub.dev/packages/dio_firebase_performance

The implementation is essentially this one file: https://github.com/eyeem/dio_firebase_performance/blob/master/lib/src/dio_firebase_performance.dart

This might not be the best implementation but it's a start.

Solution 2

Firebase Performance Monitoring currently doesn't support automatic network monitoring for Flutter apps. If this is something you'd like, please file a feature request.

Share:
787
fvisticot
Author by

fvisticot

Updated on December 08, 2022

Comments

  • fvisticot
    fvisticot over 1 year

    The plugin is correctly installed and provide already some statistics on Firebase console. But network requests are not listed. I'm using Dio plugin to manage http request.

    Is there any known issues regarding this pb ? does anybody successfully make it work ?

  • Ovidiu
    Ovidiu over 5 years
    I have added manual network monitoring using HttpMetric as per the example given on the GitHub page, but I'm still not getting any reports on either Android or iOS. Other Firebase features are working fine, eg. analytics, messaging, crash reporting.
  • humblePilgrim
    humblePilgrim over 3 years
    I used the package, but I can't see any of the network calls made to my server. I can see some records for calls to various google APIs
  • Konstantin
    Konstantin almost 3 years
    2021, the problem still exists