diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index e1c0aa2c..200d7050 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -73,7 +73,7 @@ kotlin { } pod("Sentry") { - version = "~> 8.36.0" + version = "~> 8.38.0" extraOpts += listOf("-compiler-option", "-fmodules") } diff --git a/composeApp/composeApp.podspec b/composeApp/composeApp.podspec index 98f861e1..6714ef04 100644 --- a/composeApp/composeApp.podspec +++ b/composeApp/composeApp.podspec @@ -9,7 +9,7 @@ Pod::Spec.new do |spec| spec.vendored_frameworks = 'build/cocoapods/framework/composeApp.framework' spec.libraries = 'c++' spec.ios.deployment_target = '14.0' - spec.dependency 'Sentry', '~> 8.36.0' + spec.dependency 'Sentry', '~> 8.38.0' if !Dir.exist?('build/cocoapods/framework/composeApp.framework') || Dir.empty?('build/cocoapods/framework/composeApp.framework') raise " diff --git a/composeApp/src/commonFullMain/kotlin/org/ooni/probe/shared/monitoring/CrashMonitoring.kt b/composeApp/src/commonFullMain/kotlin/org/ooni/probe/shared/monitoring/CrashMonitoring.kt index a8925c36..5fd1802f 100644 --- a/composeApp/src/commonFullMain/kotlin/org/ooni/probe/shared/monitoring/CrashMonitoring.kt +++ b/composeApp/src/commonFullMain/kotlin/org/ooni/probe/shared/monitoring/CrashMonitoring.kt @@ -13,8 +13,6 @@ import org.ooni.probe.data.repositories.PreferenceRepository class CrashMonitoring( private val preferencesRepository: PreferenceRepository, ) { - private var isEnabled = false - suspend fun setup() { preferencesRepository.getValueByKey(SettingsKey.SEND_CRASH) .onEach { sendCrash -> @@ -22,9 +20,7 @@ class CrashMonitoring( Sentry.init { it.dsn = SENTRY_DSN } - isEnabled = true } else { - isEnabled = false Sentry.close() } } @@ -35,7 +31,7 @@ class CrashMonitoring( override fun isLoggable( tag: String, severity: Severity, - ): Boolean = isEnabled && severity != Severity.Verbose + ): Boolean = Sentry.isEnabled() && severity != Severity.Verbose override fun log( severity: Severity, @@ -43,9 +39,9 @@ class CrashMonitoring( tag: String, throwable: Throwable?, ) { - if (!isEnabled) return + if (!Sentry.isEnabled()) return - if (severity == Severity.Error) { + if (severity == Severity.Warn || severity == Severity.Error) { if (throwable != null) { addBreadcrumb(severity, message, tag) Sentry.captureException(throwable) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e9a2a79c..cfa5d0ef 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -66,7 +66,7 @@ kottie = { module = "io.github.alexzhirkevich:compottie", version = "2.0.0-rc01" moko-permissions = { module ="dev.icerock.moko:permissions-compose", version = "0.18.0" } # Crash Reporting -sentry = { module = "io.sentry:sentry-kotlin-multiplatform", version = "0.9.0" } +sentry = { module = "io.sentry:sentry-kotlin-multiplatform", version = "0.10.0" } # Markdown markdown = { module = "com.mikepenz:multiplatform-markdown-renderer-m3", version = "0.26.0" } diff --git a/iosApp/Podfile.lock b/iosApp/Podfile.lock index c2a4c027..74e7870f 100644 --- a/iosApp/Podfile.lock +++ b/iosApp/Podfile.lock @@ -1,15 +1,15 @@ PODS: - composeApp (1.0): - - Sentry (~> 8.36.0) + - Sentry (~> 8.38.0) - libcrypto (2024.05.22-093305) - libevent (2024.05.22-093305) - libssl (2024.05.22-093305) - libtor (2024.05.22-093305) - libz (2024.05.22-093305) - oonimkall (2024.05.22-093305) - - Sentry (8.36.0): - - Sentry/Core (= 8.36.0) - - Sentry/Core (8.36.0) + - Sentry (8.38.0): + - Sentry/Core (= 8.38.0) + - Sentry/Core (8.38.0) - sqlite3 (3.42.0): - sqlite3/common (= 3.42.0) - sqlite3/common (3.42.0) @@ -46,14 +46,14 @@ EXTERNAL SOURCES: :podspec: https://github.com/ooni/probe-cli/releases/download/v3.22.0/oonimkall.podspec SPEC CHECKSUMS: - composeApp: c76b67d627c47a16beae854efd6e005d15cca68e + composeApp: 675ce506dcd05e76ecb4fdd0f73a10d4af635af1 libcrypto: 1bb58600c586e28688f5578f4675f5ffa46c8eaf libevent: 5c8502ca5cc38be31bb510ddade0f238bcc5f0dc libssl: 170bebcaf567a0285e91a8850b9686137d07c3e1 libtor: c72b23da6a5d2e16173149784f11cf66156c35be libz: 83658eb2a0db785623ffdf9ce13407e6b8b5c8f9 oonimkall: 9768ce9dad18265d45d2ea972c84fb0bd5237cc3 - Sentry: f8374b5415bc38dfb5645941b3ae31230fbeae57 + Sentry: 205813e7e758b53df157cedb8c55b31a14300645 sqlite3: f163dbbb7aa3339ad8fc622782c2d9d7b72f7e9c PODFILE CHECKSUM: 7ccceb3a8043e0a52e0aaf77c23a4e93dbe689e7