Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add doc comments
  • Loading branch information
angusholder committed Jan 6, 2026
commit 7a5dade65729a6c62ac3e3a5b7d08dad5fd1917a
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,29 @@ import io.sentry.IScopes
import io.sentry.ScopesAdapter


/**
* Automatically adds a Sentry span to the current scope for each database query executed.
*
* Usage - wrap this around your current [SQLiteDriver]:
* ```
* val driver = SentrySQLiteDriver(AndroidSQLiteDriver())
* ```
*
* If you use Room you can wrap the default [AndroidSQLiteDriver]:
* ```
* val database = Room.databaseBuilder(context, MyDatabase::class.java, "dbName")
* .setDriver(SentrySQLiteDriver(AndroidSQLiteDriver()))
* ...
* .build()
* ```
*/
public class SentrySQLiteDriver internal constructor(
private val scopes: IScopes,
private val delegate: SQLiteDriver,
) : SQLiteDriver {
/**
* @param delegate The [SQLiteDriver] instance to delegate calls to.
*/
public constructor(delegate: SQLiteDriver) : this(ScopesAdapter.getInstance(), delegate)

override fun open(fileName: String): SQLiteConnection {
Expand Down