Skip to content

chore(android-sqlite): Add SQLite samples to sentry-samples-android#5504

Open
0xadam-brown wants to merge 4 commits into
feat/support-sqlite-driverfrom
feat/add-sqlite-to-android-sample-app
Open

chore(android-sqlite): Add SQLite samples to sentry-samples-android#5504
0xadam-brown wants to merge 4 commits into
feat/support-sqlite-driverfrom
feat/add-sqlite-to-android-sample-app

Conversation

@0xadam-brown
Copy link
Copy Markdown
Member

📜 Description

Adds our SQLite integrations to sentry-android-samples (SentrySQLiteDriver and SentrySupportOpenSQLiteHelper).

The entry point is SQLiteActivity. Example SQL statements are identical across integrations so we can observe similarities / differences in how they handle spans. Users can exercise the integrations directly or via Room or SQLDelight.

💡 Motivation and Context

Follow-on to #5466 so we can vet SentrySQLiteDriver in the wild. Backfills to cover SentrySupportOpenSQLiteHelper.

How do I use it?

./gradlew :sentry-samples:sentry-samples-android:installDebug

Then click "Tracing" > "Open SQLiteActivity"

Screenshots

SQLite sample Sentry UI sample

💚 How did you test it?

Manually.

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Adds our SQLite integrations to sentry-android-samples (`SentrySQLiteDriver` and `SentrySupportOpenSQLiteHelper`).

The entry point is `SQLiteActivity`. Example SQL statements are identical across integrations so we can observe similarities / differences in how they handle spans. Users can exercise the integrations directly or via Room or SQLDelight.
@sentry
Copy link
Copy Markdown

sentry Bot commented Jun 5, 2026

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.43.1 (1) release

⚙️ sentry-android Build Distribution Settings

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 313.85 ms 353.56 ms 39.71 ms
Size 0 B 0 B 0 B

Baseline results on branch: feat/support-sqlite-driver

Startup times

Revision Plain With Sentry Diff
f8d2380 309.09 ms 365.52 ms 56.43 ms
2a55b58 365.41 ms 434.64 ms 69.23 ms
4993a1b 303.45 ms 392.65 ms 89.20 ms
9ed1dfc 310.92 ms 361.74 ms 50.82 ms
703e7ae 350.72 ms 415.76 ms 65.03 ms
8c92b97 310.02 ms 361.44 ms 51.42 ms

App size

Revision Plain With Sentry Diff
f8d2380 0 B 0 B 0 B
2a55b58 0 B 0 B 0 B
4993a1b 0 B 0 B 0 B
9ed1dfc 0 B 0 B 0 B
703e7ae 0 B 0 B 0 B
8c92b97 0 B 0 B 0 B

Previous results on branch: feat/add-sqlite-to-android-sample-app

Startup times

Revision Plain With Sentry Diff
3f03258 321.26 ms 361.84 ms 40.58 ms
f6e3213 291.28 ms 357.63 ms 66.35 ms

App size

Revision Plain With Sentry Diff
3f03258 0 B 0 B 0 B
f6e3213 0 B 0 B 0 B

Comment thread gradle/libs.versions.toml
room2 = "2.8.4"
room3 = "3.0.0-alpha06"
sqlite = "2.6.2"
sqliteAlpha = "2.7.0-alpha06" # Required by Room3 3.0.0-alpha*
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've included deps that are only relevant to the sample app b/c that matched prior art. Chime in if you want me to break with that practice and move the new sample app deps to its build.gradle file.

@@ -0,0 +1,106 @@
package io.sentry.samples.android.sqlite
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From here on I've flagged what few items I think are of interest. Your time is probably better spent spinning up the sample app from a local branch and seeing whether you have any feedback.

applicationId = "io.sentry.samples.android"
minSdk = libs.versions.minSdk.get().toInt()
// androidx.sqlite 2.6+ require minSdk 23; the Sentry SDK still supports 21.
minSdk = 23
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that Room 3 requires us to bump the Android sample app minSDK to 23 and JVM target to 11.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8b3c175. Configure here.

Comment thread gradle/libs.versions.toml
kotlin = "2.2.0"
kotlinSpring7 = "2.2.0"
kotlin-compatible-version = "1.9"
ksp = "2.2.0-2.0.2"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would ksp 2.3.X be compatible? that would untie it from the kotlin version compatibility issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants