Incorrect app start transaction duration when app goes in sleep

Đang mở
#5,752 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

@runningcode đang làm issue này rồi.

Từ ngày 10/9/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Android Bug Platform: Android Platform: Java

As reported by a customer we're seeing the following behavior:

  1. App is launched
  2. A cold start is detected and an ui.load transaction is created (app.start.cold + ttid)
  3. The app is backgrounded before the first frame draws (and the activity only progresses through the onCreate + onStart phases, no onDestroy) — so TTID never happens, and no lifecycle cleanup on our side runs.
  4. The device enters Doze, which freezes our deadline timer so it doesn't fire at +30s.
  5. Hours later the device wakes up, the deadline finally fires when the app is resumed, and our forceFinish stamps the spans with the current time.
  6. The resulting transactions spans over multiple hours.

I would argue that we should drop any foreground launches which have a doze in-between, as it just skews the real "user perceived" launches.

On the other hand, a real user was probably waiting for a few seconds for the app to come alive, but it didn't, so the user bailed.

Related issue: getsentry/sentry-java#5530

Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
3 ngày 2 giờ
Pull request đã merge (30 ngày)
70

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của getsentry/sentry-java

Tất cả issue của getsentry/sentry-java

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.