firebase / firebase-android-sdk

Firebase Android SDK
https://firebase.google.com
Apache License 2.0
2.27k stars 575 forks source link

Application startup time not reported when initializing FIrebaseApp manually #4759

Open louisbeaujeu opened 1 year ago

louisbeaujeu commented 1 year ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

Since version 20.3.1 it seems that Firebase Performance does not report the application startup time if Firebase is manually initialized. Probably due to this check in FirebasePerfEarly: https://github.com/firebase/firebase-android-sdk/blob/02b336526b53672f8216211d79de162cf857c81c/firebase-perf/src/main/java/com/google/firebase/perf/FirebasePerfEarly.java#L48

As StartupTime is not initialized if Firebase is manually instantiated https://github.com/firebase/firebase-android-sdk/blob/02b336526b53672f8216211d79de162cf857c81c/firebase-common/src/main/java/com/google/firebase/FirebaseApp.java#L432

Steps to reproduce:

Disable FirebaseInitProvider and initialize Firebase in code with FirebaseApp#initializeApp(context), the App startup time won't be reported on Firebase Dashboard

argzdev commented 1 year ago

Thanks for reporting, @louisbeaujeu. I was able to reproduce the same behavior. I'll notify our engineers and see what we can do here.

louisbeaujeu commented 1 year ago

Thanks for the response ! Any update on this issue ?

argzdev commented 1 year ago

Hi @louisbeaujeu, sorry for the radio silence. Our engineers are currently working on other issues at the moment. However, rest assured that this is being investigated and worked on.

That said, I'd like to ask for a favor for anyone else that encounters the same issue to kindly leave a thumbs up on the author's original post. This'll help us prioritize issues based on severity and demand. Thanks!

ganadist commented 1 year ago

In my case, I want to measure app startup time with Firebase Perf. But by this issue, I have a concern whether my app comply with legal compliance requirements such as GDPR.