Skip to content

Commit

Permalink
Clear after tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
buenaflor committed Mar 4, 2024
1 parent cea12c5 commit 9af3455
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
5 changes: 3 additions & 2 deletions flutter/lib/src/navigation/time_to_display_tracker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ class TimeToDisplayTracker {
if (isRootScreen && didFetchAppStart == false) {
// Dart cannot infer here that routeName is not nullable
if (routeName == null) return;
return _trackAppStartTTD(routeName, arguments);
await _trackAppStartTTD(routeName, arguments);
} else {
return _trackRegularRouteTTD(routeName, arguments, startTimestamp);
await _trackRegularRouteTTD(routeName, arguments, startTimestamp);
}
_ttidTracker.clear();
}

/// This method listens for the completion of the app's start process via
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@ class TimeToInitialDisplayTracker {
transaction.setMeasurement(ttidMeasurement.name, ttidMeasurement.value,
unit: ttidMeasurement.unit);
await ttidSpan.finish(endTimestamp: endTimestamp);

// We can clear the state after creating and finishing the ttid span has finished
clear();
}

Future<void> trackAppStart(ISentrySpan transaction, AppStartInfo appStartInfo,
Expand Down

0 comments on commit 9af3455

Please sign in to comment.