Skip to content

Commit fc61ea4

Browse files
committed
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.
1 parent 05aa61d commit fc61ea4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import org.jetbrains.annotations.ApiStatus
2222
* .build()
2323
* ```
2424
*
25+
* If you're using the Sentry Android Gradle plugin, wrapping will be performed automatically.
26+
*
2527
* @param delegate The [SQLiteDriver] instance to delegate calls to.
2628
*/
2729
@ApiStatus.Experimental
@@ -87,9 +89,17 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite
8789
*
8890
* In the case of (2), wrap the open helper passed to the `SupportSQLiteDriver` constructor via
8991
* `SentrySupportSQLiteOpenHelper` instead.
92+
*
93+
* Note that wrapping will be performed if the delegate isn't a `SupportSQLiteDriver` itself
94+
* but wraps or subclasses one. In that case, ensure the open helper passed to the support
95+
* driver constructor is *not* wrapped.
9096
*/
97+
// The Sentry Android Gradle Plugin relies on this method's ABI. Don't change it without
98+
// updating the SAGP.
9199
@JvmStatic
92100
public fun create(delegate: SQLiteDriver): SQLiteDriver =
101+
// The SAGP relies on the FQN check for correctness (it lets it naively instrument all
102+
// Room.DatabaseBuilder.setDriver() call sites).
93103
if (delegate is SentrySQLiteDriver || delegate.javaClass.name == SUPPORT_SQLITE_DRIVER_FQN) {
94104
delegate
95105
} else {

0 commit comments

Comments
 (0)