Skip to content

Commit

Permalink
feat(Android): Integrate source context into Android Gradle overview …
Browse files Browse the repository at this point in the history
…page (#7100)
  • Loading branch information
markushi authored Jun 6, 2023
1 parent f02689f commit ef276b1
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/platforms/android/common/gradle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ The [Sentry Android Gradle Plugin](https://github.com/getsentry/sentry-android-g
seamless integration with the Gradle build system. It supports the following features:

- ProGuard/R8 mappings upload
- Java/Kotlin Source Context upload
- Native debug symbols and sources upload
- Auto-instrumentation tracing through bytecode manipulation
- Logcat breadcrumb logging
Expand Down Expand Up @@ -85,6 +86,11 @@ sentry {
// Default is disabled.
uploadNativeSymbols = false
// Generates a source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext = false
// Does or doesn't include the source code of native code for Sentry.
// This executes sentry-cli with the --include-sources param. automatically so
// you don't need to do it manually.
Expand Down Expand Up @@ -168,6 +174,11 @@ sentry {
// Default is disabled.
uploadNativeSymbols.set(false)

// Generates a source bundle and uploads your source code to Sentry.
// This enables source context, allowing you to see your source
// code as part of your stack traces in Sentry.
includeSourceContext.set(false)

// Does or doesn't include the source code of native code for Sentry.
// This executes sentry-cli with the --include-sources param. automatically so
// you don't need to do it manually.
Expand Down Expand Up @@ -288,6 +299,24 @@ You can find your authentication token [on the Sentry API page](https://sentry.i

</Note>

## Java/Kotlin Source Context

The plugin can automatically upload your source code to Sentry so it can be shown as part of the stacktraces.

```groovy
sentry {
includeSourceContext = true
}
```

```kotlin
sentry {
includeSourceContext.set(true)
}
```

Checkout the full documentation on <PlatformLink to="/source-context">Source Context</PlatformLink> for more details.

## Tracing Auto-instrumentation

The plugin uses the [bytecode manipulation](https://www.infoq.com/articles/Living-Matrix-Bytecode-Manipulation/) framework to inject a code snippet
Expand Down

0 comments on commit ef276b1

Please sign in to comment.