Refactor: Remove Sentry integration
This commit removes the Sentry error reporting integration from the application.
Specific changes:
- Removed Sentry dependencies and plugin from `app/build.gradle.kts`.
- Commented out Sentry initialization and usage in `MainActivity.kt`.
- Commented out Sentry API calls in various files:
- `OverviewScreen.kt`
- `ChatRouterScreen.kt`
- `AppAPI.kt`
- Commented out Sentry meta-data in `AndroidManifest.xml`.
- Removed `sentry.properties` from `.gitignore`.
- Updated `lintOptions` in `app/build.gradle.kts` to set `checkReleaseBuilds = false`.
- In `ChatRouterScreen.kt`, when `showChannelUnavailableAlert` is dismissed or confirmed, set the destination to `ChatRouterDestination.Discover`.
This commit is contained in:
parent
d49a63a80e
commit
a596220d0e
|
|
@ -16,7 +16,6 @@
|
|||
.cxx
|
||||
local.properties
|
||||
peptidebuild.properties
|
||||
sentry.properties
|
||||
/.kotlin/sessions
|
||||
app/src/main/assets/embedded
|
||||
pep-api-postman.json
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import com.mikepenz.aboutlibraries.plugin.StrictMode
|
||||
import io.sentry.android.gradle.instrumentation.logcat.LogcatLevel
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
|
|
@ -12,7 +11,6 @@ plugins {
|
|||
id("com.google.dagger.hilt.android")
|
||||
id("com.google.devtools.ksp")
|
||||
id("org.jmailen.kotlinter")
|
||||
id("io.sentry.android.gradle") version "4.12.0"
|
||||
id("app.cash.sqldelight") version "2.0.1"
|
||||
id("kotlin-kapt")
|
||||
id("kotlin-parcelize")
|
||||
|
|
@ -97,11 +95,6 @@ android {
|
|||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
buildConfigField(
|
||||
"String",
|
||||
"SENTRY_DSN",
|
||||
"\"${buildproperty("sentry.dsn", "RVX_SENTRY_DSN")}\""
|
||||
)
|
||||
buildConfigField(
|
||||
"String",
|
||||
"FLAVOUR_ID",
|
||||
|
|
@ -120,11 +113,11 @@ android {
|
|||
buildproperty("build.debug.app_name", "RVX_DEBUG_APP_NAME")!!
|
||||
)
|
||||
|
||||
buildConfigField(
|
||||
"String",
|
||||
"SENTRY_DSN",
|
||||
"\"${buildproperty("sentry.dsn", "RVX_SENTRY_DSN")}\""
|
||||
)
|
||||
// buildConfigField(
|
||||
// "String",
|
||||
// "SENTRY_DSN",
|
||||
// "\"${buildproperty("sentry.dsn", "RVX_SENTRY_DSN")}\""
|
||||
// )
|
||||
buildConfigField(
|
||||
"String",
|
||||
"FLAVOUR_ID",
|
||||
|
|
@ -164,23 +157,23 @@ android {
|
|||
abortOnError = false
|
||||
disable += "MissingTranslation"
|
||||
disable += "NullSafeMutableLiveData"
|
||||
// checkReleaseBuilds false
|
||||
checkReleaseBuilds = false
|
||||
}
|
||||
}
|
||||
|
||||
sentry {
|
||||
autoUploadProguardMapping =
|
||||
buildproperty("sentry.upload_mappings", "RVX_SENTRY_UPLOAD_MAPPINGS") == "true"
|
||||
|
||||
tracingInstrumentation {
|
||||
enabled = true
|
||||
|
||||
logcat {
|
||||
enabled = true
|
||||
minLevel = LogcatLevel.WARNING
|
||||
}
|
||||
}
|
||||
}
|
||||
//sentry {
|
||||
// autoUploadProguardMapping =
|
||||
// buildproperty("sentry.upload_mappings", "RVX_SENTRY_UPLOAD_MAPPINGS") == "true"
|
||||
//
|
||||
// tracingInstrumentation {
|
||||
// enabled = true
|
||||
//
|
||||
// logcat {
|
||||
// enabled = true
|
||||
// minLevel = LogcatLevel.WARNING
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
dependencies {
|
||||
// Android/Kotlin Core
|
||||
|
|
@ -247,8 +240,8 @@ dependencies {
|
|||
implementation("com.mikepenz:aboutlibraries-core:11.3.0-rc02")
|
||||
|
||||
// Sentry - crash reporting
|
||||
implementation("io.sentry:sentry-android:8.13.2")
|
||||
implementation("io.sentry:sentry-compose-android:8.13.2")
|
||||
// implementation("io.sentry:sentry-android:8.19.1")
|
||||
// implementation("io.sentry:sentry-compose-android:8.19.1")
|
||||
|
||||
// Other AndroidX libraries
|
||||
implementation("androidx.documentfile:documentfile:1.1.0")
|
||||
|
|
@ -346,4 +339,4 @@ sqldelight {
|
|||
packageName.set("chat.peptide.persistence")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@
|
|||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
|
||||
<meta-data
|
||||
android:name="io.sentry.auto-init"
|
||||
android:value="false" />
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="io.sentry.auto-init"-->
|
||||
<!-- android:value="false" />-->
|
||||
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -35,7 +35,6 @@ import io.ktor.client.plugins.logging.Logging
|
|||
import io.ktor.client.plugins.websocket.WebSockets
|
||||
import io.ktor.client.request.header
|
||||
import io.ktor.serialization.kotlinx.json.json
|
||||
import io.sentry.Sentry
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
|
|
@ -320,7 +319,7 @@ object PeptideAPI {
|
|||
}
|
||||
RealtimeSocket.updateDisconnectionState(DisconnectionState.Disconnected)
|
||||
} catch (e: Exception) {
|
||||
Sentry.captureMessage("Error in socket error handling: $e")
|
||||
// Sentry.captureMessage("Error in socket error handling: $e")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -400,7 +399,7 @@ object PeptideAPI {
|
|||
if (!openForLocalHydration) {
|
||||
Log.w("PeptideAPI", "Hydration is closed, but was called")
|
||||
// Stale data is worst case, let's track it even in prod
|
||||
Sentry.captureMessage("Local hydration called twice or after real data was fetched")
|
||||
// Sentry.captureMessage("Local hydration called twice or after real data was fetched")
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ import com.google.android.gms.tasks.OnCompleteListener
|
|||
import com.google.firebase.messaging.FirebaseMessaging
|
||||
import dagger.hilt.android.lifecycle.HiltViewModel
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext
|
||||
import io.sentry.Sentry
|
||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||
import kotlinx.coroutines.launch
|
||||
import javax.inject.Inject
|
||||
|
|
@ -221,7 +220,7 @@ class ChatRouterViewModel @Inject constructor(
|
|||
OnCompleteListener { task ->
|
||||
if (!task.isSuccessful) {
|
||||
Log.w("FCM", "Fetching FCM registration token failed", task.exception)
|
||||
task.exception?.let { Sentry.captureException(it) }
|
||||
// task.exception?.let { Sentry.captureException(it) }
|
||||
return@OnCompleteListener
|
||||
}
|
||||
|
||||
|
|
@ -691,6 +690,7 @@ fun ChatRouterScreen(
|
|||
AlertDialog(
|
||||
onDismissRequest = {
|
||||
showChannelUnavailableAlert = false
|
||||
viewModel.setSaveDestination(ChatRouterDestination.Discover)
|
||||
},
|
||||
icon = {
|
||||
Icon(
|
||||
|
|
@ -716,6 +716,7 @@ fun ChatRouterScreen(
|
|||
confirmButton = {
|
||||
PepTextButton(onClick = {
|
||||
showChannelUnavailableAlert = false
|
||||
viewModel.setSaveDestination(ChatRouterDestination.Discover)
|
||||
}) {
|
||||
Text(text = stringResource(id = R.string.ok))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,6 @@ import chat.peptide.composables.skeletons.UserOverviewSkeleton
|
|||
import chat.peptide.internals.extensions.zero
|
||||
import chat.peptide.screens.chat.LocalIsConnected
|
||||
import chat.peptide.sheets.UserCardSheet
|
||||
import io.sentry.Sentry
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
|
|
@ -89,7 +88,7 @@ fun OverviewScreen(
|
|||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e("OverviewScreen", "Failed to fetch self", e)
|
||||
Sentry.captureException(e)
|
||||
// Sentry.captureException(e)
|
||||
isLoading = false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue