diff --git a/components/support/error/android/src/main/java/mozilla/appservices/errorsupport/RustComponentsErrorTelemetry.kt b/components/support/error/android/src/main/java/mozilla/appservices/errorsupport/RustComponentsErrorTelemetry.kt index 4f887c2ff0..722e974e3e 100644 --- a/components/support/error/android/src/main/java/mozilla/appservices/errorsupport/RustComponentsErrorTelemetry.kt +++ b/components/support/error/android/src/main/java/mozilla/appservices/errorsupport/RustComponentsErrorTelemetry.kt @@ -57,13 +57,6 @@ internal data class TracingErrorFields( val breadcrumbs: String, ) -@Serializable -internal data class TracingBreadcrumbFields( - val module: String, - val line: UInt, - val column: UInt, -) - private class ErrorEventSink : EventSink { val json = Json { ignoreUnknownKeys = true } @@ -74,54 +67,6 @@ private class ErrorEventSink : EventSink { RustComponentErrors.details.set(event.message) RustComponentErrors.breadcrumbs.set(fields.breadcrumbs.split("\n")) Pings.rustComponentErrors.submit() - - ApplicationErrorReporterRegistry.errorReporter?.reportError(fields.typeName, event.message) - } else if (event.target == "app-services-error-reporter::breadcrumb") { - val fields = json.decodeFromString(event.fields) - - ApplicationErrorReporterRegistry.errorReporter?.reportBreadcrumb( - event.message, - fields.module, - fields.line, - fields.column, - ) } } } - -/** - * Report Rust errors to Sentry (supplied by the application - * - * This represents the legacy error reporting interface. We're keeping this around for now so that - * Android can send errors to Sentry. At some point we should migrate Android to only use - * Glean-based error reporting. - */ -public interface ApplicationErrorReporter { - /** - * Report an error - */ - fun reportError(typeName: String, message: String) - - /** - * Report a breadbcrumb - */ - fun reportBreadcrumb(message: String, module: String, line: UInt, column: UInt) -} - -/** - * Set the global ApplicationErrorReporter - */ -public fun setApplicationErrorReporter(errorReporter: ApplicationErrorReporter) { - ApplicationErrorReporterRegistry.errorReporter = errorReporter -} - -/** - * Unset the global ApplicationErrorReporter - */ -public fun unsetApplicationErrorReporter() { - ApplicationErrorReporterRegistry.errorReporter = null -} - -internal object ApplicationErrorReporterRegistry { - var errorReporter: ApplicationErrorReporter? = null -}