ankidroid / ankidroid/Anki-Android

architecture: how to exclude exceptions from Analytics/Crash Reporting

Abierto
#19,577 1 comentario 0 reacciones 0 asignados Ver en GitHub
Keep Open
Lenguaje dominante
Kotlin
Estrellas
11.8k
Forks
2.9k
Merge medio
2 d 3 h
PR fusionados (30 d)
171

Descripción

I'm not sure where all of that is best placed, so I'll leave that for now

_Originally posted by @BrayanDSO in https://github.com/ankidroid/Anki-Android/pull/19559#discussion_r2553544713_

----

We have 3 places where we perform filtering:

**ThrowableFilterService** - Crash Reporting only

https://github.com/ankidroid/Anki-Android/blob/5904c8a2119351c1e7d93dbd73ab88577a27ca30/AnkiDroid/src/main/java/com/ichi2/anki/servicelayer/ThrowableFilterService.kt#L89-L100

**runCatching { }**
https://github.com/ankidroid/Anki-Android/blob/4e50cdfb63e3e58cb4d2037010edbb51caec60d9/AnkiDroid/src/main/java/com/ichi2/anki/CoroutineHelpers.kt#L192-L205

**CrashReportData: only run after runCatching**
https://github.com/ankidroid/Anki-Android/blob/4e50cdfb63e3e58cb4d2037010edbb51caec60d9/AnkiDroid/src/main/java/com/ichi2/anki/CoroutineHelpers.kt#L651-L656

We should make an informed decision:

* ACRA-only filtering, or skip analytics as well?
* If we have a generic `runCatching`, should that treat filtering exceptions differently than if an exception is directly passed to `CrashReportService.sendExceptionReport`
* should other metadata/`onlyIfSilent` be settable by callers?

https://github.com/ankidroid/Anki-Android/blob/9be215482bb597c683aa62d03cf5e14bc74354ec/AnkiDroid/src/main/java/com/ichi2/anki/CrashReportService.kt#L287-L292

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.