ankidroid / ankidroid/Anki-Android

architecture: how to exclude exceptions from Analytics/Crash Reporting

Ouverte
#19,577 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Keep Open
Langage dominant
Kotlin
Étoiles
11.8k
Forks
2.9k
Merge moyen
2 j 3 h
PR mergées (30 j)
171

Description

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

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.