Skip to content

chore(samples-android): Adapt SQLite demo screen to SAGP build mode#5568

Merged
0xadam-brown merged 2 commits into
mainfrom
chore/use-sagp-with-sample-sqlite-activity
Jun 19, 2026
Merged

chore(samples-android): Adapt SQLite demo screen to SAGP build mode#5568
0xadam-brown merged 2 commits into
mainfrom
chore/use-sagp-with-sample-sqlite-activity

Conversation

@0xadam-brown

Copy link
Copy Markdown
Member

📜 Description

Exposes a BuildConfig.USE_SAGP property from the recently introduced -PuseSagp flag (#5538).

Also updates the SQLite screen in the Android sample app so that it swizzles between auto-instrumenting vs manually wrapping SQLiteDriver, depending on the whether SAGP was applied to the build.

💡 Motivation and Context

Lets us test end-to-end our SentrySQLiteDriver and its auto-wiring via the SAGP.

JAVA-275, GRADLE-107

Screenshots

screenshot

Note the new pill that tells us whether or not the sample app was built via the SAGP. The SAGP auto-instruments SQLiteDriver when used with Room 2 and Room 3, but not when used directly – hence the buttons' enabled vs disabled states. (SQLDelight doesn't support SQLiteDriver whatsoever.)

💚 How did you test it?

Manually via the samples app:

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

📝 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

Exposes a `BuildConfig.USE_SAGP` property from the recently introduced -PuseSagp flag ([#5538](#5538)).

Lets us update the SQLite screen in the Android sample app so that it swizzles between auto-instrumenting vs manually wrapping `SQLiteDriver`, depending on the whether SAGP was applied to the build.
@sentry

sentry Bot commented Jun 18, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-android Build Distribution Settings

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 319.14 ms 360.19 ms 41.05 ms
Size 0 B 0 B 0 B

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
a416a65 316.52 ms 359.67 ms 43.15 ms
22ff2c7 306.60 ms 336.65 ms 30.05 ms
d15471f 310.26 ms 377.04 ms 66.78 ms
b750b96 408.98 ms 480.32 ms 71.34 ms
14ff5ee 419.75 ms 495.73 ms 75.98 ms
eb95ded 317.51 ms 369.08 ms 51.57 ms
c8125f3 383.82 ms 441.66 ms 57.84 ms
17a0955 372.53 ms 446.70 ms 74.17 ms
9d2f4e3 311.75 ms 357.80 ms 46.05 ms
ed33deb 343.30 ms 362.41 ms 19.10 ms

App size

Revision Plain With Sentry Diff
a416a65 1.58 MiB 2.12 MiB 555.26 KiB
22ff2c7 0 B 0 B 0 B
d15471f 1.58 MiB 2.13 MiB 559.54 KiB
b750b96 1.58 MiB 2.10 MiB 533.19 KiB
14ff5ee 1.58 MiB 2.10 MiB 535.08 KiB
eb95ded 0 B 0 B 0 B
c8125f3 1.58 MiB 2.10 MiB 532.32 KiB
17a0955 1.58 MiB 2.10 MiB 533.20 KiB
9d2f4e3 0 B 0 B 0 B
ed33deb 1.58 MiB 2.13 MiB 559.52 KiB

Previous results on branch: chore/use-sagp-with-sample-sqlite-activity

Startup times

Revision Plain With Sentry Diff
cd919be 312.37 ms 359.30 ms 46.93 ms

App size

Revision Plain With Sentry Diff
cd919be 0 B 0 B 0 B

@runningcode runningcode left a comment

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.

looks great! love the debugging UI with the indication of how the app was built!

Comment thread sentry-samples/sentry-samples-android/build.gradle.kts Outdated
@0xadam-brown 0xadam-brown merged commit 05aa61d into main Jun 19, 2026
33 checks passed
@0xadam-brown 0xadam-brown deleted the chore/use-sagp-with-sample-sqlite-activity branch June 19, 2026 15:20
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