From 8f97d247a69fd7321a2d22f21fd6a92d4f689cbd Mon Sep 17 00:00:00 2001 From: Chenxia Liu Date: Mon, 23 Sep 2019 18:29:33 -0700 Subject: [PATCH] For #235 - Add Glean crash count + docs. --- app/src/main/java/org/mozilla/fenix/components/Analytics.kt | 3 +++ docs/crash-reporting.md | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index 2c8d3436e..a10c20831 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -10,6 +10,7 @@ import android.content.Context import android.content.Intent import mozilla.components.lib.crash.CrashReporter import mozilla.components.lib.crash.service.CrashReporterService +import mozilla.components.lib.crash.service.GleanCrashReporterService import mozilla.components.lib.crash.service.MozillaSocorroService import mozilla.components.lib.crash.service.SentryService import org.mozilla.fenix.BuildConfig @@ -46,6 +47,8 @@ class Analytics( services.add(sentryService) } + services.add(GleanCrashReporterService(context)) + // The name "Fenix" here matches the product name on Socorro and is unrelated to the actual app name: // https://bugzilla.mozilla.org/show_bug.cgi?id=1523284 val socorroService = MozillaSocorroService(context, appName = "Fenix") diff --git a/docs/crash-reporting.md b/docs/crash-reporting.md index dd5317b46..abc8d1419 100644 --- a/docs/crash-reporting.md +++ b/docs/crash-reporting.md @@ -6,6 +6,12 @@ This page documents the types of crash reporting, how the various parts interact Documentation for the specific libraries is included in the [https://github.com/mozilla-mobile/android-components/blob/master/components/lib/crash/README.md](Android Components Crash Reporting README). +## Glean crash ping + +[Glean SDK](https://mozilla.github.io/glean/book/index.html) is a Mozilla open source telemetry library, which Firefox Preview uses to collect app telemetry. It can also collect crash counts as a labeled counter with each label corresponding to a specific type of crash (such as `native_code_crash`, `unhandled_exception`). + +The Glean crash ping format is documented [here](https://github.com/mozilla-mobile/android-components/blob/master/components/lib/crash/docs/metrics.md). + ## Socorro [Socorro](https://wiki.mozilla.org/Socorro) is a Mozilla open source project for [crash statistics](https://crash-stats.mozilla.org/). Firefox Preview uses Socorro to track native GeckoView crashes. Crash reports contain a signature, classifications, and a number of improved fields (e.g. OS, product, version) - you can read more about what is sent in these fields in the [Socorro report documentation](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Crash_reporting/Understanding_crash_reports).