Skip to content

Commit

Permalink
Fix start timestamp not set in ActivityLifecycleIntegration (#2210)
Browse files Browse the repository at this point in the history
  • Loading branch information
adinauer authored Aug 5, 2022
1 parent 14ec39d commit ba925d3
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ private void startTracing(final @NotNull Activity activity) {
}
});

if (!(firstActivityCreated || appStartTime == null || coldStart == null)) {
transactionOptions.setStartTimestamp(appStartTime);
}

// we can only bind to the scope if there's no running transaction
ITransaction transaction =
hub.startTransaction(
Expand All @@ -190,8 +194,6 @@ private void startTracing(final @NotNull Activity activity) {

// in case appStartTime isn't available, we don't create a span for it.
if (!(firstActivityCreated || appStartTime == null || coldStart == null)) {
transactionOptions.setStartTimestamp(appStartTime);

// start specific span for app start
appStartSpan =
transaction.startChild(
Expand Down

0 comments on commit ba925d3

Please sign in to comment.