getsentry / sentry-java

A Sentry SDK for Java, Android and other JVM languages.
https://docs.sentry.io/
MIT License
1.16k stars 435 forks source link

Initial display time is reported incorrectly #3896

Open zhukic opened 4 days ago

zhukic commented 4 days ago

Integration

sentry-android

Build System

Gradle

AGP Version

8.7.2

Proguard

Enabled

Version

7.14.0

Steps to Reproduce

  1. Enable "Don't keep activities" in developer options.
  2. Open app
  3. Leave the app
  4. Open the app again in 20 seconds

Expected Result

Correct ui.load span

Actual Result

ui.load span duration is more than 20 seconds

Image

As I understand, the root cause is here - when an activity gets destroyed in the background its paused time is used as the start time for the next ui.load transaction

markushi commented 2 days ago

@zhukic Thanks for reporting, we'll have a closer look at this.