getsentry / getsentry/sentry-java

Add API to track screens

Đang mở
#2,981 3 bình luận 0 reaction 1 người được giao Được @markushi nhận Xem trên GitHub
Android Feature Spans
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
67

Mô tả

For the insights modules we want to provide metrics on a screen level. As of now, we do not track screens per se, but have automatic (idle) activity transactions which offers similar functionality.

In order to no rely too much on future performance features(like spans without transactions) we could the following:
* For every screen, create a long running transaction
* Add user interactions as spans
* Add slow/frozen frames as spans
* Add TTID/TTFD metrics to the screen txn

As a default implementation we can have an Activity based screen provider, as this would work for any Android app.

#### Implementation Details
> For every screen, create a long running transaction

It makes sense to stop the transaction as some point, so whenever the screen is closed or a timeout (30s?) is reached the txn gets finished.

> Add user interactions as spans

Right now it would create it's own idle txn, can be turned into a span instead. Should be simply enough.

> Add slow/frozen frames as spans

Should be similar to what we have right now

> Add TTID/TTFD metrics to the screen txn

This is probably the trickiest one, as the start of the TTID is the moment where the new screen isn't active yet.
If an app is activity based it works like this
1. `Activity.onPause()` is called for the old screen, --> this is the starting point of the TTID/TTFD measurement
2. New Activity is created and launched
3. New Activity.onResume is called
4. New Activity renders first frame --> end of TTID measurement

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

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

Đánh giá

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

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.