getsentry / getsentry/sentry-java

Use PriorityQueue when capturing events and prioritize Crash events over others

Đang mở
#2,733 1 bình luận 0 reaction 1 người được giao Được @romtsn nhận Xem trên GitHub
Android Errors Improvement
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ả

### Description

We use a single-threaded queued executor for caching and sending events, we could actually use a priority queue as the underlying implementation and prioritize crash events over everything else, because they are blocking the execution thread (often main thread on Android). For now, if you have other events in the queue (like custom messages, non-fatal errors, transactions, etc.), they all will be postponing the release of the crash lock if it comes in after them, and we could put it on top of the queue instead.

We should keep thread safety in mind here, and potential side effects on e.g. session state, when prioritizing crashes over e.g. ANRs.

Originally reported in #2719

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.