From 479dcd18d922c23b74f072895ddc6c7a76ea4c8e Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 22 Jun 2026 09:42:45 +0200 Subject: [PATCH 1/6] chore(android-sqlite): Update SQLite instrumentation documentation ahead of 8.45.0 release We'll be coordinating the 8.45.0 release with SAGP auto-instrumentation for the SentrySQLiteDriver. Commit contains related documentation updates. --- .../main/java/io/sentry/sqlite/SentrySQLiteDriver.kt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt index 22f6353d88..0c566b869d 100644 --- a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt +++ b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt @@ -22,6 +22,8 @@ import org.jetbrains.annotations.ApiStatus * .build() * ``` * + * If you're using the Sentry Android Gradle plugin, wrapping will be performed automatically. + * * @param delegate The [SQLiteDriver] instance to delegate calls to. */ @ApiStatus.Experimental @@ -87,9 +89,17 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite * * In the case of (2), wrap the open helper passed to the `SupportSQLiteDriver` constructor via * `SentrySupportSQLiteOpenHelper` instead. + * + * Note that wrapping will be performed if the delegate isn't a `SupportSQLiteDriver` itself + * but wraps or subclasses one. In that case, ensure the open helper passed to the support + * driver constructor is *not* wrapped. */ + // The Sentry Android Gradle Plugin depends on this method's ABI. Don't change it without + // updating the SAGP. @JvmStatic public fun create(delegate: SQLiteDriver): SQLiteDriver = + // The SAGP relies on the FQN check for correctness (it lets it naively instrument all + // Room.DatabaseBuilder.setDriver() call sites). if (delegate is SentrySQLiteDriver || delegate.javaClass.name == SUPPORT_SQLITE_DRIVER_FQN) { delegate } else { From a44348b55e531731a189d10681613ec851d24996 Mon Sep 17 00:00:00 2001 From: Sentry Github Bot Date: Mon, 22 Jun 2026 08:48:53 +0000 Subject: [PATCH 2/6] Format code --- .../src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt index 0c566b869d..805b330c18 100644 --- a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt +++ b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt @@ -90,9 +90,9 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite * In the case of (2), wrap the open helper passed to the `SupportSQLiteDriver` constructor via * `SentrySupportSQLiteOpenHelper` instead. * - * Note that wrapping will be performed if the delegate isn't a `SupportSQLiteDriver` itself - * but wraps or subclasses one. In that case, ensure the open helper passed to the support - * driver constructor is *not* wrapped. + * Note that wrapping will be performed if the delegate isn't a `SupportSQLiteDriver` itself but + * wraps or subclasses one. In that case, ensure the open helper passed to the support driver + * constructor is *not* wrapped. */ // The Sentry Android Gradle Plugin depends on this method's ABI. Don't change it without // updating the SAGP. From b8608c9787e48fd856a4ff4caf31c20db9cb92a0 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 23 Jun 2026 10:40:54 +0200 Subject: [PATCH 3/6] Condense inline comments --- .../main/java/io/sentry/sqlite/SentrySQLiteDriver.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt index 805b330c18..3154b05474 100644 --- a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt +++ b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt @@ -22,7 +22,8 @@ import org.jetbrains.annotations.ApiStatus * .build() * ``` * - * If you're using the Sentry Android Gradle plugin, wrapping will be performed automatically. + * If you're using the Sentry Android Gradle Plugin (SAGP), wrapping will be performed + * automatically. * * @param delegate The [SQLiteDriver] instance to delegate calls to. */ @@ -94,12 +95,11 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite * wraps or subclasses one. In that case, ensure the open helper passed to the support driver * constructor is *not* wrapped. */ - // The Sentry Android Gradle Plugin depends on this method's ABI. Don't change it without - // updating the SAGP. + // Warning! The SAGP depends on this method's ABI. @JvmStatic public fun create(delegate: SQLiteDriver): SQLiteDriver = - // The SAGP relies on the FQN check for correctness (it lets it naively instrument all - // Room.DatabaseBuilder.setDriver() call sites). + // FQN check simplifies our SAGP implementation, allowing it to naively instrument all + // Room.DatabaseBuilder.setDriver() call sites. if (delegate is SentrySQLiteDriver || delegate.javaClass.name == SUPPORT_SQLITE_DRIVER_FQN) { delegate } else { From 61fbbccb6d060af705e740ba3f165175a822944f Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Tue, 23 Jun 2026 16:42:21 +0200 Subject: [PATCH 4/6] Fix RoomDatabase reference in comments --- .../src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt index 3154b05474..51bef33d57 100644 --- a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt +++ b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt @@ -99,7 +99,7 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite @JvmStatic public fun create(delegate: SQLiteDriver): SQLiteDriver = // FQN check simplifies our SAGP implementation, allowing it to naively instrument all - // Room.DatabaseBuilder.setDriver() call sites. + // RoomDatabase.Builder.setDriver() call sites. if (delegate is SentrySQLiteDriver || delegate.javaClass.name == SUPPORT_SQLITE_DRIVER_FQN) { delegate } else { From ef7c426c3d4c48bc5f232fbfe22fdd84e12cd015 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 24 Jun 2026 10:17:40 +0200 Subject: [PATCH 5/6] Update sentry-android-sqlite README --- sentry-android-sqlite/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sentry-android-sqlite/README.md b/sentry-android-sqlite/README.md index 7bf9edf347..307beb51f0 100644 --- a/sentry-android-sqlite/README.md +++ b/sentry-android-sqlite/README.md @@ -4,11 +4,13 @@ SQLite instrumentation for AndroidX APIs. Two instrumentation paths are supported: -- **`androidx.sqlite.SQLiteDriver`**: Used by Room 2.7+ and 3.0+. +- **`androidx.sqlite.SQLiteDriver`**: Used by Room 2.7+ and 3.0+. Applied automatically by the Sentry Android Gradle Plugin. - **`androidx.sqlite.db.SupportSQLiteOpenHelper`**: Used by SQLDelight and legacy (pre-2.7) Room. Applied automatically by the Sentry Android Gradle Plugin. To avoid duplicate spans, only one path should be used per database file. Most Room and SQLDelight APIs enforce that division. The exception is Room's `SupportSQLiteDriver`: either the `SupportSQLiteOpenHelper` it consumes should be wrapped or the support driver itself, but never both. +See the [SQLite integration docs](https://docs.sentry.io/platforms/android/integrations/room-and-sqlite/) for more details. + ## Package layout The module is organized as two separate packages: From ab5fdcf7718f001a7631af81a672d2cf1e10ad42 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Wed, 24 Jun 2026 13:26:30 +0200 Subject: [PATCH 6/6] Specify SAGP version that auto-instruments SQLiteDriver --- .../src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt index 51bef33d57..4a616ba3ab 100644 --- a/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt +++ b/sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt @@ -22,7 +22,7 @@ import org.jetbrains.annotations.ApiStatus * .build() * ``` * - * If you're using the Sentry Android Gradle Plugin (SAGP), wrapping will be performed + * If you're using the Sentry Android Gradle Plugin (SAGP) 6.13.0+, wrapping will be performed * automatically. * * @param delegate The [SQLiteDriver] instance to delegate calls to.