getsentry / getsentry/sentry-java
Ability to filter by "user-perceived" unhandled exceptions/fatal errors generated by the Kotlin SDK
- Linguagem predominante
- Kotlin
- Estrelas
- 1.4k
- Forks
- 478
- Merge médio
- 3d 4h
- PRs com merge (30d)
- 72
Descrição
### Problem Statement
Due to the behavior of [coroutines exception handling](https://kotlinlang.org/docs/exception-handling.html), a failure to catch the exception can sometimes result in a crash, if the request was made from certain contexts, and can be swallowed when made from others.
In both of these cases, Sentry labels the error as `level:fatal` with `exception.handled:false`. However, this creates the possibility for a spike in "crashes" that do not actually crash the app for the user.
We recently encountered this issue with a `android_getaddrinfo` exception, where a user was trying to make a network connection while in airplane mode. What we saw is a huge spike in errors in Sentry, but when we went to Google Play, we were able to _filter by user-perceived errors_ and see that the actual count of crashes for this issue was very very low.
It appears that Sentry's "Crash free user rate" takes into consideration fatal errors that are "user perceived" vs. not (the spike in errors did not impact our crash free user rate).
### Solution Brainstorm
We'd love to be able to query by `user_perceived:true` in Discover, Dashboards, and Alerts (for error data sources) so that we can differentiate between user-perceived vs non-main thread crashes ourselves.
when specifying `user_perceived:true`, I would expect to only see crashes that resulted in the Android app closing, and contribute to the crash-free user rate shown by Sentry.
when specifying `user_perceived:false level:fatal`, I would expect to only see errors that are swallowed up by the parent coroutine and do not actually crash the app for the user.
### Product Area
Issues
┆Issue is synchronized with this [Jira Improvement](https://getsentry.atlassian.net/browse/FEEDBACK-2204) by [Unito](https://www.unito.io)
Guia de contribuição
Direção de pesquisa
Nenhum arquivo do repositório, teste ou ponto de entrada é mencionado. Comece revisando o comportamento das exceções das coroutines do Kotlin descrito na issue e os dados existentes de crashes percebidos pelo usuário usados pelo Sentry. Ao concluir, o suporte à filtragem user_perceived:true e user_perceived:false level:fatal estaria disponível em Discover, Dashboards e Alerts.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- android, kotlin
- Domínio
- mobile-dev, observability-sre
- Tipo de issue
- Funcionalidade
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 25/100