diff --git a/src/platforms/android/common/performance/instrumentation/automatic-instrumentation.mdx b/src/platforms/android/common/performance/instrumentation/automatic-instrumentation.mdx
index f2a51a8bc3f84..26d5a4fe735a1 100644
--- a/src/platforms/android/common/performance/instrumentation/automatic-instrumentation.mdx
+++ b/src/platforms/android/common/performance/instrumentation/automatic-instrumentation.mdx
@@ -181,3 +181,27 @@ The span finishes once the request has been executed. The span `status` depends
When the HTTP request throws an `IOException`, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and SentryEvent will be linked when viewing it on the **Issue Details** page in sentry.io.
For more information see our [OkHttp integration](/platforms/android/configuration/integrations/okhttp/).
+
+### SQLite and Room Instrumentation
+
+
+
+Supported in Sentry's Android SDK version `4.0.0` and above.
+
+Supported in Sentry Android Gradle Plugin version `3.0.0` and above.
+
+
+
+The [Sentry Android Gradle Plugin](/platforms/android/proguard/#gradle-configuration) does the tracing auto instrumentation via bytecode manipulation for `SQLite` and `Room` libraries.
+
+The Plugin injects a code snippet that starts a span out of the active span bound to the scope for each `CRUD` operation. The SDK sets the span `operation` to `db` and `description` to the SQL Query if available.
+
+The span finishes once the operation has been executed. The span `status` is set to `SpanStatus.OK` if successful or `SpanStatus.INTERNAL_ERROR` if there was any error.
+
+When the operation throws an `Exception`, Sentry's SDK associates this exception to the running span. If you haven't set the SDK to swallow the exception and capture it, the span and SentryEvent will be linked when viewing it on the **Issue Details** page in sentry.io.
+
+
+
+It's recommended to use `androidx.room` version `2.0.0` or above, since it supports incremental builds.
+
+
diff --git a/src/platforms/android/common/proguard.mdx b/src/platforms/android/common/proguard.mdx
index c7940930402db..209521ea495ba 100644
--- a/src/platforms/android/common/proguard.mdx
+++ b/src/platforms/android/common/proguard.mdx
@@ -12,6 +12,8 @@ The Android SDK ships with ProGuard rules automatically defined; no further conf
+The `io.sentry.android.gradle` >= `3.0.0` requires [Android Gradle Plugin >= 7.0.0](https://developer.android.com/studio/releases/gradle-plugin#7-0-0).
+
## Gradle
Using Gradle (Android Studio) in your `app/build.gradle` add:
@@ -64,8 +66,9 @@ Additionally, we expose a few configuration values directly in your `app/build.g
```groovy
sentry {
// Enables or disables the automatic upload of mapping files
- // during a build. If you disable this, you'll need to manually
+ // during a build. If you disable this, you'll need to manually
// upload the mapping files with sentry-cli when you do a release.
+ // Default is enabled.
autoUpload = true
// Disables or enables the automatic configuration of Native Symbols
@@ -79,14 +82,24 @@ sentry {
// you don't need to do it manually.
// Default is disabled.
includeNativeSources = false
+
+ // Enable or disable the tracing instrumentation.
+ // Does auto instrumentation for 'androidx.sqlite' and 'androidx.room' libraries.
+ // It starts and finishes a Span within any CRUD operation.
+ // Default is enabled.
+ // Only available v3.0.0 and above.
+ tracingInstrumentation {
+ enabled = true
+ }
}
```
```kotlin
sentry {
// Enables or disables the automatic upload of mapping files
- // during a build. If you disable this, you'll need to manually
+ // during a build. If you disable this, you'll need to manually
// upload the mapping files with sentry-cli when you do a release.
+ // Default is enabled.
autoUpload.set(true)
// Disables or enables the automatic configuration of Native Symbols
@@ -100,6 +113,15 @@ sentry {
// you don't need to do it manually.
// Default is disabled.
includeNativeSources.set(false)
+
+ // Enable or disable the tracing instrumentation.
+ // Does auto instrumentation for 'androidx.sqlite' and 'androidx.room' libraries.
+ // It starts and finishes a Span within any CRUD operation.
+ // Default is enabled.
+ // Only available v3.0.0 and above.
+ tracingInstrumentation {
+ enabled.set(true)
+ }
}
```
diff --git a/src/platforms/android/migration.mdx b/src/platforms/android/migration.mdx
index 8b6e114c1fbb1..88fd8d7df20df 100644
--- a/src/platforms/android/migration.mdx
+++ b/src/platforms/android/migration.mdx
@@ -6,6 +6,40 @@ redirect_from:
description: "Migrating between versions of Sentry's SDK for Android."
---
+## Migrating from `io.sentry:sentry-android-gradle-plugin 2.x` to `io.sentry:sentry-android-gradle-plugin 3.0.0`
+
+The `io.sentry.android.gradle` >= `3.0.0` requires [Android Gradle Plugin >= 7.0.0](https://developer.android.com/studio/releases/gradle-plugin#7-0-0).
+
+The `tracingInstrumentation` feature requires the Sentry's Android SDK version `4.0.0` and above, otherwise it throws a `NoClassDefFoundError` exception.
+
+The `io.sentry.android.gradle` enables the tracing instrumentation (via bytecode manipulation) for `androidx.sqlite` and `androidx.room` libraries by default, to disable it, see the code snippet bellow.
+
+```groovy
+sentry {
+ // Enable or disable the tracing instrumentation.
+ // Does auto instrumentation for 'androidx.sqlite' and 'androidx.room' libraries.
+ // It starts and finishes a Span within any CRUD operation.
+ // Default is enabled.
+ // Only available v3.0.0 and above.
+ tracingInstrumentation {
+ enabled = false
+ }
+}
+```
+
+```kotlin
+sentry {
+ // Enable or disable the tracing instrumentation.
+ // Does auto instrumentation for 'androidx.sqlite' and 'androidx.room' libraries.
+ // It starts and finishes a Span within any CRUD operation.
+ // Default is enabled.
+ // Only available v3.0.0 and above.
+ tracingInstrumentation {
+ enabled.set(false)
+ }
+}
+```
+
## Migrating from `io.sentry:sentry-android-gradle-plugin 1.x` to `io.sentry:sentry-android-gradle-plugin 2.0.0`
The `io.sentry.android.gradle` >= `2.0.0` requires [Android Gradle Plugin >= 4.0.0](https://developer.android.com/studio/releases/gradle-plugin#4-0-0).