Verified Commit 4f3a53a6 authored by Dan Ballard's avatar Dan Ballard Committed by boklm
Browse files

TB 44507: [android] Drop Sentry as a dependancy

parent 604887b2
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ jna = "5.18.1"
json = "20251224"
okhttp = "4.12.0"
okio = "3.15.0"
sentry = "8.33.0"
zxing = "3.5.4"

[libraries]
@@ -286,7 +285,6 @@ mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version.ref = "
okhttp = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" }
okhttp-urlconnection = { module = "com.squareup.okhttp3:okhttp-urlconnection", version.ref = "okhttp" }
okio = { module = "com.squareup.okio:okio", version.ref = "okio" }
sentry = { module = "io.sentry:sentry-android", version.ref = "sentry" }
zxing = { module = "com.google.zxing:core", version.ref = "zxing" }

[plugins]
+0 −14
Original line number Diff line number Diff line
@@ -1726,20 +1726,6 @@ projects:
    - components:support-utils
    - components:tooling-lint
    - components:ui-icons
  components:lib-crash-sentry:
    description: A crash reporter for Sentry.io that that uses lib-crash.
    path: components/lib/crash-sentry
    publish: true
    upstream_dependencies:
    - components:concept-base
    - components:concept-fetch
    - components:lib-crash
    - components:lib-publicsuffixlist
    - components:support-base
    - components:support-ktx
    - components:support-test
    - components:support-utils
    - components:tooling-lint
  components:lib-dataprotect:
    description: A component using AndroidKeyStore to protect user data.
    path: components/lib/dataprotect
+0 −2
Original line number Diff line number Diff line
@@ -649,7 +649,6 @@ dependencies {
    implementation project(':components:ui-tabcounter')
    implementation project(':components:ui-widgets')
    implementation project(':components:lib-crash')
    implementation project(':components:lib-crash-sentry')
    implementation project(':components:lib-dataprotect')
    implementation project(':components:lib-push-firebase')
    implementation project(':components:lib-state')
@@ -713,7 +712,6 @@ dependencies {
    implementation libs.play.review
    implementation libs.play.review.ktx
    implementation libs.protobuf.javalite
    implementation libs.sentry

    debugImplementation libs.androidx.compose.ui.tooling
    debugImplementation libs.leakcanary
+3 −33
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ import mozilla.components.lib.crash.runtimetagproviders.BuildRuntimeTagProvider
import mozilla.components.lib.crash.runtimetagproviders.EnvironmentRuntimeProvider
import mozilla.components.lib.crash.runtimetagproviders.ExperimentDataRuntimeTagProvider
import mozilla.components.lib.crash.runtimetagproviders.VersionInfoProvider
import mozilla.components.lib.crash.sentry.SentryService
import mozilla.components.lib.crash.sentry.eventprocessors.CrashMetadataEventProcessor
import mozilla.components.lib.crash.service.CrashReporterService
import mozilla.components.lib.crash.service.GleanCrashReporterService
import mozilla.components.lib.crash.service.socorro.MozillaSocorroService
@@ -60,37 +58,9 @@ class Analytics(
        val services = mutableListOf<CrashReporterService>()
        val distributionId = "Mozilla"

        if (isSentryEnabled()) {
            // We treat caught exceptions similar to debug logging.
            // On the release channel volume of these is too high for our Sentry instances, and
            // we get most value out of nightly/beta logging anyway.
            val shouldSendCaughtExceptions = when (Config.channel) {
                ReleaseChannel.Release -> false
                else -> true
            }
            val sentryService = SentryService(
                context,
                BuildConfig.SENTRY_TOKEN,
                tags = mapOf(
                    "geckoview" to "$MOZ_APP_VERSION-$MOZ_APP_BUILDID",
                    "fenix.git" to BuildConfig.VCS_HASH,
                ),
                environment = BuildConfig.BUILD_TYPE,
                sendEventForNativeCrashes = false, // Do not send native crashes to Sentry
                sendCaughtExceptions = shouldSendCaughtExceptions,
                sentryProjectUrl = getSentryProjectUrl(),
                crashMetadataEventProcessor = CrashMetadataEventProcessor(),
            )

            // We only want to initialize Sentry on startup on the main process.
            if (context.isMainProcess()) {
                runWhenReadyQueue.runIfReadyOrQueue {
                    sentryService.initIfNeeded()
                }
            }

            services.add(sentryService)
        }
        // Bug 44507: Drop Sentry as a dependency
        // Since we've removed sentry and it's library (for defence in depth as well as spave saving)
        // We can't keep any code that calls a now non existent library

        // 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