Upload Debug Symbols
Learn more about how to upload debug symbols in Sentry Kotlin Multiplatform.
To symbolicate your stack traces, you need to provide debug information to Sentry. The symbolication process unscrambles the stack traces to reveal the function, file names, and line numbers of the crash.
For Apple applications please follow the iOS documentation on Uploading Debug Symbols to set up debug symbols upload.
To upload ProGuard mapping files or Native debug symbols via Gradle you need to install the Sentry Android Gradle Plugin in your androidApp
module:
androidApp/build.gradle.kts
plugins {
id("com.android.application")
id("io.sentry.android.gradle") version "5.8.0"
}
sentry {
// Prevent Sentry dependencies from being included in the Android app through the AGP.
autoInstallation {
enabled.set(false)
}
// The slug of the Sentry organization to use for uploading proguard mappings/source contexts.
org.set("example-org")
// The slug of the Sentry project to use for uploading proguard mappings/source contexts.
projectName.set("example-project")
// The authentication token to use for uploading proguard mappings/source contexts.
// WARNING: Do not expose this token in your build.gradle files, but rather set an environment
// variable and read it into this property.
authToken.set(System.getenv("SENTRY_AUTH_TOKEN"))
}
After installing the plugin, you need to configure your auth token as an environment variable:
export SENTRY_AUTH_TOKEN=sntrys_YOUR_TOKEN_HERE
Once configured, the plugin will automatically upload the necessary debug symbols to Sentry when a release build is created.
Learn more in the Sentry Gradle Plugin docs for ProGuard/R8 & DexGuard.
You can find more information in the Sentry Gradle Plugin docs for Native Debug Symbols and Sources.
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").