Skip to content

Commit 775682c

Browse files
committed
Add logging in syncFlush
1 parent c01019d commit 775682c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

firebase-perf/src/main/java/com/google/firebase/perf/session/gauges/GaugeManager.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,13 +230,8 @@ public void stopCollectingGauges() {
230230
gaugeManagerDataCollectionJob.cancel(false);
231231
}
232232

233-
234233
final String sessionIdForScheduledTask = session.aqsSessionId();
235234
this.session = null;
236-
if (sessionIdForScheduledTask.equals(Constants.UNDEFINED_AQS_ID)) {
237-
// TODO(b/394127311): Use DebugEnforcementCheck.
238-
return;
239-
}
240235

241236
// Flush any data that was collected for this session one last time.
242237
@SuppressWarnings("FutureReturnValueIgnored")
@@ -249,7 +244,6 @@ public void stopCollectingGauges() {
249244
},
250245
TIME_TO_WAIT_BEFORE_FLUSHING_GAUGES_QUEUE_MS,
251246
TimeUnit.MILLISECONDS);
252-
253247
}
254248

255249
/**
@@ -260,6 +254,11 @@ public void stopCollectingGauges() {
260254
* @param appState The app state for which these gauges are collected.
261255
*/
262256
private void syncFlush(String sessionId, ApplicationProcessState appState) {
257+
if (sessionId.equals(Constants.UNDEFINED_AQS_ID)) {
258+
// TODO(b/394127311): Use DebugEnforcementCheck.
259+
// This will currently log those sessions to Constants.UNDEFINED_AQS_ID)
260+
logger.debug("Flushing app start gauge metrics to an undefined session ID.");
261+
}
263262
GaugeMetric.Builder gaugeMetricBuilder = GaugeMetric.newBuilder();
264263

265264
// Adding CPU metric readings.

0 commit comments

Comments
 (0)