From 479dcd18d922c23b74f072895ddc6c7a76ea4c8e Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 22 Jun 2026 09:42:45 +0200 Subject: [PATCH 1/4] 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/4] 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/4] 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/4] 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 {