Skip to content

Commit 9af3455

Browse files
committed
Clear after tracking
1 parent cea12c5 commit 9af3455

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

flutter/lib/src/navigation/time_to_display_tracker.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ class TimeToDisplayTracker {
3434
if (isRootScreen && didFetchAppStart == false) {
3535
// Dart cannot infer here that routeName is not nullable
3636
if (routeName == null) return;
37-
return _trackAppStartTTD(routeName, arguments);
37+
await _trackAppStartTTD(routeName, arguments);
3838
} else {
39-
return _trackRegularRouteTTD(routeName, arguments, startTimestamp);
39+
await _trackRegularRouteTTD(routeName, arguments, startTimestamp);
4040
}
41+
_ttidTracker.clear();
4142
}
4243

4344
/// This method listens for the completion of the app's start process via

flutter/lib/src/navigation/time_to_initial_display_tracker.dart

-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ class TimeToInitialDisplayTracker {
5656
transaction.setMeasurement(ttidMeasurement.name, ttidMeasurement.value,
5757
unit: ttidMeasurement.unit);
5858
await ttidSpan.finish(endTimestamp: endTimestamp);
59-
60-
// We can clear the state after creating and finishing the ttid span has finished
61-
clear();
6259
}
6360

6461
Future<void> trackAppStart(ISentrySpan transaction, AppStartInfo appStartInfo,

0 commit comments

Comments
 (0)