-
-
Notifications
You must be signed in to change notification settings - Fork 354
Fix how bundle IDs are getting defined for individual bundles #5342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| eb07ba3+dirty | 419.49 ms | 482.12 ms | 62.63 ms |
| 2adbd1e+dirty | 366.13 ms | 419.49 ms | 53.36 ms |
| 276d348+dirty | 356.30 ms | 405.27 ms | 48.97 ms |
| 95aaf8a+dirty | 342.82 ms | 393.75 ms | 50.93 ms |
| f234eb4+dirty | 313.23 ms | 333.31 ms | 20.08 ms |
| 2b89ce9+dirty | 372.22 ms | 417.06 ms | 44.84 ms |
| c1573b3+dirty | 355.65 ms | 448.82 ms | 93.17 ms |
| 818a608+dirty | 350.29 ms | 397.38 ms | 47.09 ms |
| 6fee48d+dirty | 370.23 ms | 427.86 ms | 57.63 ms |
| b7aa1aa+dirty | 281.02 ms | 317.53 ms | 36.51 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| eb07ba3+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
| 2adbd1e+dirty | 7.15 MiB | 8.43 MiB | 1.28 MiB |
| 276d348+dirty | 7.15 MiB | 8.42 MiB | 1.26 MiB |
| 95aaf8a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| f234eb4+dirty | 7.15 MiB | 8.46 MiB | 1.30 MiB |
| 2b89ce9+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| c1573b3+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
| 818a608+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6fee48d+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| b7aa1aa+dirty | 7.15 MiB | 8.46 MiB | 1.31 MiB |
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 93137d1+dirty | 400.15 ms | 424.74 ms | 24.59 ms |
| 20d5eaa | 377.62 ms | 406.50 ms | 28.88 ms |
| 4167e15+dirty | 344.77 ms | 367.78 ms | 23.01 ms |
| b7aa1aa+dirty | 324.73 ms | 327.76 ms | 3.03 ms |
| 1d62dde+dirty | 409.00 ms | 453.90 ms | 44.90 ms |
| 534ba8c | 484.00 ms | 499.93 ms | 15.93 ms |
| 6479fd5+dirty | 412.95 ms | 434.02 ms | 21.07 ms |
| 5ee3314+dirty | 415.80 ms | 426.14 ms | 10.34 ms |
| 1226664+dirty | 347.45 ms | 386.60 ms | 39.15 ms |
| 64cd15c | 439.02 ms | 427.63 ms | -11.39 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 93137d1+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| 20d5eaa | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 4167e15+dirty | 17.75 MiB | 19.74 MiB | 1.99 MiB |
| b7aa1aa+dirty | 17.75 MiB | 19.75 MiB | 2.00 MiB |
| 1d62dde+dirty | 17.75 MiB | 19.74 MiB | 2.00 MiB |
| 534ba8c | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 6479fd5+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 5ee3314+dirty | 17.75 MiB | 19.70 MiB | 1.95 MiB |
| 1226664+dirty | 17.75 MiB | 19.74 MiB | 1.99 MiB |
| 64cd15c | 17.75 MiB | 20.15 MiB | 2.41 MiB |
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7be1f99+dirty | 1222.43 ms | 1217.15 ms | -5.28 ms |
| 46da307+dirty | 1213.45 ms | 1207.96 ms | -5.49 ms |
| 534ba8c+dirty | 1225.00 ms | 1237.43 ms | 12.43 ms |
| a0b15d6+dirty | 1213.79 ms | 1210.45 ms | -3.34 ms |
| 59f3a84+dirty | 1205.09 ms | 1213.31 ms | 8.23 ms |
| 20daa0a+dirty | 1227.71 ms | 1233.72 ms | 6.01 ms |
| 8ece263+dirty | 1206.90 ms | 1211.45 ms | 4.55 ms |
| df83aad+dirty | 1202.06 ms | 1203.83 ms | 1.77 ms |
| c94a927+dirty | 1211.33 ms | 1223.31 ms | 11.97 ms |
| 46bd012+dirty | 1231.78 ms | 1212.30 ms | -19.47 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7be1f99+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 46da307+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
| 534ba8c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| a0b15d6+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 59f3a84+dirty | 3.19 MiB | 4.56 MiB | 1.37 MiB |
| 20daa0a+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| 8ece263+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| df83aad+dirty | 3.41 MiB | 4.57 MiB | 1.16 MiB |
| c94a927+dirty | 3.19 MiB | 4.56 MiB | 1.37 MiB |
| 46bd012+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7be1f99+dirty | 1226.69 ms | 1217.76 ms | -8.93 ms |
| 46da307+dirty | 1217.08 ms | 1224.16 ms | 7.08 ms |
| 534ba8c+dirty | 1230.22 ms | 1231.18 ms | 0.96 ms |
| a0b15d6+dirty | 1220.18 ms | 1223.18 ms | 3.00 ms |
| 59f3a84+dirty | 1232.56 ms | 1238.12 ms | 5.56 ms |
| 20daa0a+dirty | 1233.12 ms | 1233.35 ms | 0.22 ms |
| 8ece263+dirty | 1217.29 ms | 1213.35 ms | -3.94 ms |
| df83aad+dirty | 1187.20 ms | 1190.55 ms | 3.36 ms |
| c94a927+dirty | 1227.14 ms | 1239.64 ms | 12.50 ms |
| 46bd012+dirty | 1220.49 ms | 1226.89 ms | 6.40 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 7be1f99+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 46da307+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
| 534ba8c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| a0b15d6+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 59f3a84+dirty | 2.63 MiB | 3.99 MiB | 1.36 MiB |
| 20daa0a+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| 8ece263+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| df83aad+dirty | 3.41 MiB | 4.57 MiB | 1.16 MiB |
| c94a927+dirty | 2.63 MiB | 3.99 MiB | 1.36 MiB |
| 46bd012+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| hash.update(bundleCode); | ||
| debugId = stringToUUID(hash.digest('hex')); | ||
| // eslint-disable-next-line no-console | ||
| console.log('info ' + `Bundle Debug ID (calculated): ${debugId}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: Wdyt of adding new tests for the fallback flow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed that we should at least add one test.
| // That needs to be done because when Metro 0.83.2 stopped importing `BabelSourceMapSegment` | ||
| // from `@babel/generator` and defined it locally, it subtly changed the source map output format. | ||
| // https://github.com/facebook/metro/blob/main/packages/metro-source-map/src/source-map.js#L47 | ||
| const hash = crypto.createHash('md5'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: could we reuse the calculateDebugId function below?
antonis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work identifying and fixing this @alwx 🎸
The fallback approach looks solid to me. Added a couple of questions but overall LGTM.
| ### Fixes | ||
|
|
||
| - Android SDK not being disabled when `options.enabled` is set to `false` ([#5334](https://github.com/getsentry/sentry-react-native/pull/5334)) | ||
| - Fixes how bundle IDs are getting defined for individual bundles ([#5342](https://github.com/getsentry/sentry-react-native/pull/5342)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add a reference to 0.83.2+ here
📢 Type of change
📜 Description
Fixes #5250
Here is the root cause:
preModulesarrayThe solution is to generate bundle IDs for individual code chunks.
That needs to be done because when Metro 0.83.2 stopped importing
BabelSourceMapSegmentfrom@babel/generatorand defined it locally, it subtly changed the source map output format.📝 Checklist
sendDefaultPIIis enabled