File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
firebase-perf/src/main/java/com/google/firebase/perf/session Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,17 @@ class FirebasePerformanceSessionSubscriber(override val isDataCollectionEnabled:
2828
2929 override fun onSessionChanged (sessionDetails : SessionSubscriber .SessionDetails ) {
3030 val currentPerfSession = SessionManager .getInstance().perfSession()
31- // TODO(b/394127311): Add logic to deal with app start gauges.
3231 FirebaseSessionsEnforcementCheck .checkSession(currentPerfSession, " onSessionChanged" )
3332
33+ if (currentPerfSession.isLegacy()) {
34+ GaugeManager .getInstance().logGaugeMetadata(sessionDetails.sessionId, ApplicationProcessState .FOREGROUND )
35+ GaugeManager .getInstance().logExistingGaugeMetrics(sessionDetails.sessionId, ApplicationProcessState .FOREGROUND )
36+ }
37+
3438 val updatedSession = PerfSession .createWithId(sessionDetails.sessionId)
3539 SessionManager .getInstance().updatePerfSession(updatedSession)
3640 GaugeManager .getInstance()
3741 .logGaugeMetadata(updatedSession.sessionId(), ApplicationProcessState .FOREGROUND )
42+ // TODO(b/394127311): Update app state change and start logging if necessary.
3843 }
3944}
Original file line number Diff line number Diff line change 3030public class PerfSession implements Parcelable {
3131 private final Timer creationTime ;
3232 private final String sessionId ;
33- private boolean isGaugeAndEventCollectionEnabled = false ;
33+ private boolean isGaugeAndEventCollectionEnabled = true ;
3434
3535 /*
3636 * Creates a PerfSession object and decides what metrics to collect.
Original file line number Diff line number Diff line change 2323import com .google .firebase .perf .logging .FirebaseSessionsEnforcementCheck ;
2424import com .google .firebase .perf .session .gauges .GaugeManager ;
2525import com .google .firebase .perf .v1 .ApplicationProcessState ;
26- import com .google .firebase .perf .v1 .GaugeMetadata ;
27- import com .google .firebase .perf .v1 .GaugeMetric ;
2826import java .lang .ref .WeakReference ;
2927import java .util .HashSet ;
3028import java .util .Iterator ;
You can’t perform that action at this time.
0 commit comments