feat(core): Add OTA SDK version to native sdk.packages#6191
Merged
Conversation
…differ Pass the JS runtime SDK version to native during init. When it differs from the built-in version (indicating an OTA update changed the JS bundle), add an extra `npm:@sentry/react-native:ota` entry to `sdk.packages` with the actual runtime version. Closes #4385 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
Plus 16 more 🤖 This preview updates automatically when you update the PR. |
Contributor
|
Contributor
Author
|
@sentry review |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit ee19627. Configure here.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📲 Install BuildsAndroid
|
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1122a96+dirty | 3823.10 ms | 1218.64 ms | -2604.46 ms |
| 4b87b12+dirty | 1212.90 ms | 1222.09 ms | 9.19 ms |
| 8929511+dirty | 1216.42 ms | 1219.02 ms | 2.60 ms |
| a0d8cf8+dirty | 3842.33 ms | 1212.40 ms | -2629.93 ms |
| 5c1e987+dirty | 1204.30 ms | 1222.15 ms | 17.85 ms |
| 6177334+dirty | 3834.85 ms | 1217.58 ms | -2617.28 ms |
| 7d6fd3a+dirty | 1223.29 ms | 1229.57 ms | 6.28 ms |
| 71abba0+dirty | 3821.93 ms | 1202.81 ms | -2619.12 ms |
| 3b6e9f9+dirty | 3851.90 ms | 1233.33 ms | -2618.57 ms |
| 2c735cc+dirty | 1229.67 ms | 1221.50 ms | -8.17 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1122a96+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 4b87b12+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| 8929511+dirty | 3.38 MiB | 4.80 MiB | 1.42 MiB |
| a0d8cf8+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 5c1e987+dirty | 3.38 MiB | 4.73 MiB | 1.35 MiB |
| 6177334+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 7d6fd3a+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| 71abba0+dirty | 5.15 MiB | 6.67 MiB | 1.52 MiB |
| 3b6e9f9+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 2c735cc+dirty | 3.38 MiB | 4.74 MiB | 1.35 MiB |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3817909+dirty | 406.67 ms | 416.58 ms | 9.91 ms |
| 4b87b12+dirty | 421.82 ms | 413.60 ms | -8.22 ms |
| df5d108+dirty | 527.06 ms | 603.58 ms | 76.52 ms |
| 71abba0+dirty | 496.54 ms | 525.16 ms | 28.63 ms |
| 890d145+dirty | 504.54 ms | 491.55 ms | -12.99 ms |
| 23598c3+dirty | 414.12 ms | 426.24 ms | 12.12 ms |
| 44c8b3f+dirty | 414.20 ms | 457.28 ms | 43.08 ms |
| 3b6e9f9+dirty | 442.70 ms | 486.44 ms | 43.74 ms |
| 7ac3378+dirty | 404.78 ms | 439.84 ms | 35.06 ms |
| 1122a96+dirty | 422.22 ms | 464.33 ms | 42.10 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3817909+dirty | 43.75 MiB | 48.08 MiB | 4.33 MiB |
| 4b87b12+dirty | 43.75 MiB | 48.14 MiB | 4.39 MiB |
| df5d108+dirty | 43.75 MiB | 48.08 MiB | 4.33 MiB |
| 71abba0+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 890d145+dirty | 43.75 MiB | 48.14 MiB | 4.39 MiB |
| 23598c3+dirty | 43.75 MiB | 48.16 MiB | 4.41 MiB |
| 44c8b3f+dirty | 48.30 MiB | 53.46 MiB | 5.15 MiB |
| 3b6e9f9+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| 7ac3378+dirty | 43.75 MiB | 48.13 MiB | 4.37 MiB |
| 1122a96+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1122a96+dirty | 3839.17 ms | 1219.23 ms | -2619.93 ms |
| 4b87b12+dirty | 1199.49 ms | 1199.78 ms | 0.29 ms |
| 8929511+dirty | 1223.41 ms | 1222.49 ms | -0.92 ms |
| a0d8cf8+dirty | 3826.15 ms | 1213.12 ms | -2613.03 ms |
| 5c1e987+dirty | 1208.43 ms | 1220.72 ms | 12.29 ms |
| 6177334+dirty | 3851.52 ms | 1226.23 ms | -2625.29 ms |
| 7d6fd3a+dirty | 1210.89 ms | 1217.63 ms | 6.74 ms |
| 71abba0+dirty | 3852.70 ms | 1224.53 ms | -2628.16 ms |
| 3b6e9f9+dirty | 3822.77 ms | 1208.00 ms | -2614.77 ms |
| 2c735cc+dirty | 1223.33 ms | 1224.38 ms | 1.04 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1122a96+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 4b87b12+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| 8929511+dirty | 3.38 MiB | 4.80 MiB | 1.42 MiB |
| a0d8cf8+dirty | 5.15 MiB | 6.67 MiB | 1.51 MiB |
| 5c1e987+dirty | 3.38 MiB | 4.73 MiB | 1.35 MiB |
| 6177334+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 7d6fd3a+dirty | 3.38 MiB | 4.77 MiB | 1.39 MiB |
| 71abba0+dirty | 5.15 MiB | 6.67 MiB | 1.52 MiB |
| 3b6e9f9+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| 2c735cc+dirty | 3.38 MiB | 4.74 MiB | 1.35 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 71abba0+dirty | 411.04 ms | 453.67 ms | 42.63 ms |
| 2c735cc+dirty | 435.20 ms | 459.48 ms | 24.28 ms |
| 44c8b3f+dirty | 492.13 ms | 563.47 ms | 71.34 ms |
| 0d9949d+dirty | 414.88 ms | 428.68 ms | 13.81 ms |
| 3b6e9f9+dirty | 442.39 ms | 486.44 ms | 44.05 ms |
| 5c1e987+dirty | 444.71 ms | 475.13 ms | 30.42 ms |
| 4b87b12+dirty | 356.23 ms | 399.86 ms | 43.63 ms |
| 1122a96+dirty | 510.16 ms | 542.00 ms | 31.84 ms |
| ef27341+dirty | 519.02 ms | 553.42 ms | 34.40 ms |
| 5569641+dirty | 465.92 ms | 532.22 ms | 66.30 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 71abba0+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 2c735cc+dirty | 43.94 MiB | 48.94 MiB | 5.00 MiB |
| 44c8b3f+dirty | 48.30 MiB | 53.46 MiB | 5.15 MiB |
| 0d9949d+dirty | 43.94 MiB | 48.99 MiB | 5.05 MiB |
| 3b6e9f9+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| 5c1e987+dirty | 43.94 MiB | 48.94 MiB | 5.00 MiB |
| 4b87b12+dirty | 43.94 MiB | 49.00 MiB | 5.06 MiB |
| 1122a96+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
| ef27341+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
| 5569641+dirty | 48.30 MiB | 53.48 MiB | 5.18 MiB |
alwx
approved these changes
May 20, 2026
lucas-zimerman
approved these changes
May 20, 2026
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.
📢 Type of change
📜 Description
When an OTA update (e.g. CodePush, Expo Updates) replaces the JS bundle, the runtime
@sentry/react-nativeversion can drift from the version baked into the native binary at build time.This change passes the JS runtime SDK version to native during init. If it differs from the built-in version, an additional
npm:@sentry/react-native:otaentry is added tosdk.packageswith the actual runtime version. When versions match (the normal case), no extra entry is added.💡 Motivation and Context
Closes #4385
OTA updates can cause native/JS SDK version misalignment, which may lead to unexpected behavior. Recording the actual JS version alongside the built-in one helps when debugging SDK issues — you can immediately see if an OTA mismatch is in play.
Improvement on #4380, which added the built-in version to
sdk.packages.💚 How did you test it?
sdkVersionis passed to native SDK during init📝 Checklist
sendDefaultPIIis enabled🔮 Next steps