DiagnosticsReporter

Crash diagnostics: breadcrumbs that trace what led to a failure, and failures reported without crashing the app.

Any layer may take it, repositories included, because a failure that never reaches a screen, such as a cache write in the background or a billing callback, still has to be seen. It carries no product analytics, so depending on it never turns a repository into an analytics source.

Inheritors

Functions

Link copied to clipboard
abstract fun logBreadcrumb(message: String, attributes: Map<String, String> = emptyMap())

Adds a breadcrumb to the crash log, for tracing what happened before a failure.

Link copied to clipboard
abstract fun recordNonFatal(throwable: Throwable, attributes: Map<String, String> = emptyMap())

Records a non-fatal throwable that has no ViewModel context.

Link copied to clipboard
abstract fun reportViewModelError(viewModelName: String, action: String, throwable: Throwable, extraKeys: Map<String, String> = emptyMap())

Reports a ViewModel flow failure with useful context.