mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
enhance(android): add crash report using sentry.io
This commit is contained in:
3
android/.gitignore
vendored
3
android/.gitignore
vendored
@@ -94,3 +94,6 @@ capacitor-cordova-android-plugins
|
||||
|
||||
# Copied web assets
|
||||
app/src/main/assets/public
|
||||
|
||||
# Sentry Config File
|
||||
sentry.properties
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
|
||||
plugins {
|
||||
id 'io.sentry.android.gradle' version '4.1.1'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
@@ -15,6 +20,7 @@ android {
|
||||
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
||||
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
}
|
||||
manifestPlaceholders = [LOGSEQ_SENTRY_DSN: "$System.env.LOGSEQ_SENTRY_DSN"]
|
||||
}
|
||||
buildTypes {
|
||||
release {
|
||||
@@ -53,3 +59,13 @@ try {
|
||||
} catch(Exception e) {
|
||||
logger.warn("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
||||
}
|
||||
|
||||
|
||||
sentry {
|
||||
org = "logseq"
|
||||
projectName = "logseq"
|
||||
|
||||
// this will upload your source code to Sentry to show it as part of the stack traces
|
||||
// disable if you don't want to expose your sources
|
||||
includeSourceContext = false
|
||||
}
|
||||
|
||||
@@ -60,5 +60,20 @@
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
|
||||
<!-- Required: set your sentry.io project identifier (DSN) -->
|
||||
<meta-data android:name="io.sentry.dsn" android:value="${LOGSEQ_SENTRY_DSN}" />
|
||||
|
||||
<!-- enable automatic breadcrumbs for user interactions (clicks, swipes, scrolls) -->
|
||||
<meta-data android:name="io.sentry.traces.user-interaction.enable" android:value="true" />
|
||||
<!-- enable screenshot for crashes (could contain sensitive/PII data) -->
|
||||
<meta-data android:name="io.sentry.attach-screenshot" android:value="true" />
|
||||
<!-- enable view hierarchy for crashes -->
|
||||
<meta-data android:name="io.sentry.attach-view-hierarchy" android:value="true" />
|
||||
|
||||
<!-- enable the performance API by setting a sample-rate, adjust in production env -->
|
||||
<meta-data android:name="io.sentry.traces.sample-rate" android:value="1.0" />
|
||||
<!-- enable profiling when starting transactions, adjust in production env -->
|
||||
<meta-data android:name="io.sentry.traces.profiling.sample-rate" android:value="1.0" />
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
Reference in New Issue
Block a user