firebase / firebase/firebase-android-sdk

Application startup time not reported when initializing FIrebaseApp manually

Open
#4,759 15 comments 11 reactions 0 assignees View on GitHub
api: performance type: feature request
Dominant language
Java
Stars
2.6k
Forks
710
Avg merge
2d 23h
Merged PRs (30d)
34

Description

### [REQUIRED] Step 2: Describe your environment

- Android Studio version: Android Studio Electric Eel | 2022.1.1 Patch 2
- Firebase Component: Performance
- Component version: 20.3.1

### [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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.