chore(samples-android): Adapt SQLite demo screen to SAGP build mode#5568
Merged
Conversation
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.
📲 Install BuildsAndroid
|
Contributor
Performance metrics 🚀
|
| 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 |
runningcode
approved these changes
Jun 19, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
looks great! love the debugging UI with the indication of how the app was built!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Exposes a
BuildConfig.USE_SAGPproperty 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
SentrySQLiteDriverand its auto-wiring via the SAGP.JAVA-275, GRADLE-107
Screenshots
Note the new pill that tells us whether or not the sample app was built via the SAGP. The SAGP auto-instruments
SQLiteDriverwhen used with Room 2 and Room 3, but not when used directly – hence the buttons' enabled vs disabled states. (SQLDelight doesn't supportSQLiteDriverwhatsoever.)💚 How did you test it?
Manually via the samples app:
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps