getsentry / getsentry/sentry-java

Use PriorityQueue when capturing events and prioritize Crash events over others

Offen
#2,733 1 Kommentar 0 Reaktionen 1 zugewiesene Person Beansprucht von @romtsn Auf GitHub ansehen
Android Errors Improvement
Vorherrschende Sprache
Kotlin
Sterne
1.4k
Forks
478
Ø Merge
2 T. 23 Std.
Gemergte PRs (30 T.)
67

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.