getsentry / sentry-react-native

Official Sentry SDK for React Native
https://sentry.io
MIT License
1.59k stars 337 forks source link

Fix: Aligns Android autoupload logic with iOS #4262

Closed antonis closed 1 week ago

antonis commented 1 week ago

:loudspeaker: Type of change

:scroll: Description

Aligns Android SENTRY_DISABLE_NATIVE_DEBUG_UPLOAD logic with the SENTRY_DISABLE_XCODE_DEBUG_UPLOAD on iOS, so that the upload is performed only when both the new flag is false and the SENTRY_DISABLE_AUTO_UPLOAD is false

SENTRYDISABLE AUTO_UPLOAD SENTRYDISABLE NATIVE_DEBUG_UPLOAD XCODE_DEBUG_UPLOAD Upload iOS Upload Android (before) Upload Android (after)
true true false false false
true false false true false
false true false true false
false false true true true

https://github.com/getsentry/sentry-react-native/pull/4263 fixes case when the native upload is disabled but still JS source maps should be uploaded.

:bulb: Motivation and Context

See https://github.com/getsentry/sentry-react-native/pull/4258#issuecomment-2469917567

:green_heart: How did you test it?

CI

:pencil: Checklist

:crystal_ball: Next steps

skip-changelog

github-actions[bot] commented 1 week ago

Android (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 468.48 ms 450.55 ms -17.93 ms
Size 17.74 MiB 20.08 MiB 2.34 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e73f4eddcecda26c0380795bce5ba97e1f11b91f+dirty 332.96 ms 354.33 ms 21.37 ms
70e6261eb7fdf57e3aba1f72d12c3eb518bcad99 482.65 ms 495.70 ms 13.05 ms
1d86dd6360b3a0207437816b46e13d91fdeaf4aa 405.14 ms 411.06 ms 5.92 ms
3853f4362ec819042552ffa9ed30e8f6627e60bf 329.68 ms 346.32 ms 16.64 ms
e5bc97b850117530a0b5a1fd7728fcf3909efb04 438.96 ms 437.39 ms -1.57 ms
4cc5c276b8e06761211f41601792dfcbfc7dd854 460.04 ms 496.32 ms 36.28 ms
12427f44d4b7746c431a369b538ec70ab2993c02 393.69 ms 414.84 ms 21.14 ms
544699261cd72e3efc1259ba66b138f5f70a05ed 403.40 ms 426.70 ms 23.30 ms
cdf2f334f8389e9747b61d338d9ba8945027b0d1 469.46 ms 462.17 ms -7.29 ms
0d3e6775185b3030074b2bca3cb796e5d265910b 422.82 ms 411.90 ms -10.92 ms

App size

Revision Plain With Sentry Diff
e73f4eddcecda26c0380795bce5ba97e1f11b91f+dirty 17.73 MiB 20.04 MiB 2.31 MiB
70e6261eb7fdf57e3aba1f72d12c3eb518bcad99 17.73 MiB 19.94 MiB 2.21 MiB
1d86dd6360b3a0207437816b46e13d91fdeaf4aa 17.73 MiB 19.86 MiB 2.12 MiB
3853f4362ec819042552ffa9ed30e8f6627e60bf 17.73 MiB 19.81 MiB 2.08 MiB
e5bc97b850117530a0b5a1fd7728fcf3909efb04 17.74 MiB 20.08 MiB 2.34 MiB
4cc5c276b8e06761211f41601792dfcbfc7dd854 17.73 MiB 19.95 MiB 2.21 MiB
12427f44d4b7746c431a369b538ec70ab2993c02 17.73 MiB 19.85 MiB 2.12 MiB
544699261cd72e3efc1259ba66b138f5f70a05ed 17.73 MiB 19.85 MiB 2.12 MiB
cdf2f334f8389e9747b61d338d9ba8945027b0d1 17.74 MiB 20.08 MiB 2.34 MiB
0d3e6775185b3030074b2bca3cb796e5d265910b 17.74 MiB 20.07 MiB 2.34 MiB

Previous results on branch: antonis/android-skip-upload

Startup times

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e 433.41 ms 432.16 ms -1.25 ms

App size

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e 17.74 MiB 20.08 MiB 2.34 MiB
github-actions[bot] commented 1 week ago

Android (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 490.57 ms 570.20 ms 79.62 ms
Size 7.15 MiB 8.35 MiB 1.20 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e73f4eddcecda26c0380795bce5ba97e1f11b91f+dirty 262.98 ms 311.02 ms 48.04 ms
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 401.23 ms 435.65 ms 34.42 ms
1d86dd6360b3a0207437816b46e13d91fdeaf4aa+dirty 335.76 ms 371.22 ms 35.46 ms
70e6261eb7fdf57e3aba1f72d12c3eb518bcad99+dirty 395.08 ms 408.12 ms 13.04 ms
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 337.15 ms 370.47 ms 33.32 ms
d2c32bbdb8e91690865169f98c6ef7e2ed672df2+dirty 445.45 ms 497.85 ms 52.41 ms
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 288.40 ms 391.44 ms 103.04 ms
6e8584e8f1988b33cc24c85f32711c91358905fa+dirty 383.37 ms 400.84 ms 17.47 ms
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 409.10 ms 471.61 ms 62.51 ms
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 398.10 ms 411.48 ms 13.38 ms

App size

Revision Plain With Sentry Diff
e73f4eddcecda26c0380795bce5ba97e1f11b91f+dirty 7.15 MiB 8.09 MiB 965.94 KiB
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 7.15 MiB 8.39 MiB 1.24 MiB
1d86dd6360b3a0207437816b46e13d91fdeaf4aa+dirty 7.15 MiB 8.13 MiB 1002.18 KiB
70e6261eb7fdf57e3aba1f72d12c3eb518bcad99+dirty 7.15 MiB 8.21 MiB 1.07 MiB
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 7.15 MiB 8.10 MiB 979.68 KiB
d2c32bbdb8e91690865169f98c6ef7e2ed672df2+dirty 7.15 MiB 8.35 MiB 1.20 MiB
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 7.15 MiB 8.07 MiB 949.80 KiB
6e8584e8f1988b33cc24c85f32711c91358905fa+dirty 7.15 MiB 8.13 MiB 1002.18 KiB
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 7.15 MiB 8.35 MiB 1.20 MiB
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 7.15 MiB 8.35 MiB 1.20 MiB

Previous results on branch: antonis/android-skip-upload

Startup times

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 373.04 ms 401.94 ms 28.90 ms

App size

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 7.15 MiB 8.35 MiB 1.20 MiB
github-actions[bot] commented 1 week ago

iOS (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1242.15 ms 1227.43 ms -14.71 ms
Size 2.92 MiB 3.66 MiB 757.22 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
76d1bafa51ac0d20b127bc97b0f45201263636c3+dirty 1245.00 ms 1257.76 ms 12.76 ms
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 1272.00 ms 1284.38 ms 12.38 ms
15c80abcaf3bedf5d6f15c0eebefc9e7c1524da1+dirty 1248.41 ms 1251.24 ms 2.83 ms
4a6664fa7140687cfa079f2d738b59b18e4ac7b7+dirty 1218.77 ms 1221.07 ms 2.30 ms
0db0c729a4ac7c205a44cb4702fa7ba5b0bc03c0+dirty 1258.88 ms 1262.52 ms 3.64 ms
b1e87125f5dbad623a4e4293384e68e8f702cc19+dirty 1284.11 ms 1297.82 ms 13.71 ms
d197b5c9ca10ac3f729d1b3ef805328665aa0895+dirty 1234.80 ms 1249.20 ms 14.40 ms
c2a4e9b9386a596d6e84a9d857c77418388c0e5f+dirty 1247.39 ms 1243.04 ms -4.35 ms
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 1291.62 ms 1296.80 ms 5.18 ms
ac41368cedb5f4e78bd1019e9a859ea193c3fb1a+dirty 1226.69 ms 1229.96 ms 3.27 ms

App size

Revision Plain With Sentry Diff
76d1bafa51ac0d20b127bc97b0f45201263636c3+dirty 2.92 MiB 3.38 MiB 475.74 KiB
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 2.92 MiB 3.43 MiB 524.26 KiB
15c80abcaf3bedf5d6f15c0eebefc9e7c1524da1+dirty 2.92 MiB 3.39 MiB 481.56 KiB
4a6664fa7140687cfa079f2d738b59b18e4ac7b7+dirty 2.92 MiB 3.60 MiB 702.09 KiB
0db0c729a4ac7c205a44cb4702fa7ba5b0bc03c0+dirty 2.92 MiB 3.40 MiB 492.71 KiB
b1e87125f5dbad623a4e4293384e68e8f702cc19+dirty 2.92 MiB 3.40 MiB 494.15 KiB
d197b5c9ca10ac3f729d1b3ef805328665aa0895+dirty 2.92 MiB 3.37 MiB 464.41 KiB
c2a4e9b9386a596d6e84a9d857c77418388c0e5f+dirty 2.92 MiB 3.64 MiB 739.91 KiB
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 2.92 MiB 3.37 MiB 464.31 KiB
ac41368cedb5f4e78bd1019e9a859ea193c3fb1a+dirty 2.92 MiB 3.69 MiB 794.29 KiB

Previous results on branch: antonis/android-skip-upload

Startup times

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 1230.29 ms 1225.92 ms -4.37 ms

App size

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 2.92 MiB 3.66 MiB 757.18 KiB
krystofwoldrich commented 1 week ago

Thank you @antonis, this make sense, the flag should behave exactly the same if possible.

I've noticed one more case where there was a difference between iOS and Android.

If you agree I would supercede this PR with https://github.com/getsentry/sentry-react-native/pull/4263

github-actions[bot] commented 1 week ago

iOS (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1231.00 ms 1236.89 ms 5.89 ms
Size 2.36 MiB 3.10 MiB 752.58 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
76d1bafa51ac0d20b127bc97b0f45201263636c3+dirty 1244.10 ms 1268.52 ms 24.42 ms
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 1266.22 ms 1274.84 ms 8.62 ms
15c80abcaf3bedf5d6f15c0eebefc9e7c1524da1+dirty 1223.74 ms 1228.96 ms 5.22 ms
4a6664fa7140687cfa079f2d738b59b18e4ac7b7+dirty 1209.49 ms 1208.63 ms -0.86 ms
0db0c729a4ac7c205a44cb4702fa7ba5b0bc03c0+dirty 1275.02 ms 1285.84 ms 10.82 ms
b1e87125f5dbad623a4e4293384e68e8f702cc19+dirty 1256.02 ms 1265.14 ms 9.12 ms
d197b5c9ca10ac3f729d1b3ef805328665aa0895+dirty 1217.61 ms 1242.66 ms 25.05 ms
c2a4e9b9386a596d6e84a9d857c77418388c0e5f+dirty 1240.10 ms 1239.22 ms -0.88 ms
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 1267.55 ms 1286.21 ms 18.66 ms
ac41368cedb5f4e78bd1019e9a859ea193c3fb1a+dirty 1226.65 ms 1237.90 ms 11.24 ms

App size

Revision Plain With Sentry Diff
76d1bafa51ac0d20b127bc97b0f45201263636c3+dirty 2.36 MiB 2.82 MiB 469.45 KiB
575f9da84059fc88110565adb1ffc0751799bcf4+dirty 2.36 MiB 2.87 MiB 520.20 KiB
15c80abcaf3bedf5d6f15c0eebefc9e7c1524da1+dirty 2.36 MiB 2.83 MiB 474.49 KiB
4a6664fa7140687cfa079f2d738b59b18e4ac7b7+dirty 2.36 MiB 3.04 MiB 696.39 KiB
0db0c729a4ac7c205a44cb4702fa7ba5b0bc03c0+dirty 2.36 MiB 2.84 MiB 487.01 KiB
b1e87125f5dbad623a4e4293384e68e8f702cc19+dirty 2.36 MiB 2.84 MiB 488.84 KiB
d197b5c9ca10ac3f729d1b3ef805328665aa0895+dirty 2.36 MiB 2.82 MiB 462.86 KiB
c2a4e9b9386a596d6e84a9d857c77418388c0e5f+dirty 2.36 MiB 3.08 MiB 734.00 KiB
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 2.36 MiB 2.82 MiB 462.82 KiB
ac41368cedb5f4e78bd1019e9a859ea193c3fb1a+dirty 2.36 MiB 3.14 MiB 793.46 KiB

Previous results on branch: antonis/android-skip-upload

Startup times

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 1207.47 ms 1209.54 ms 2.07 ms

App size

Revision Plain With Sentry Diff
c484309c25a067489bdb412b15252f518988537e+dirty 2.36 MiB 3.10 MiB 752.62 KiB
antonis commented 1 week ago

If you agree I would supercede this PR with https://github.com/getsentry/sentry-react-native/pull/4263

Sounds good @krystofwoldrich 👍 I've merged your changes so that they target main and updated the PR description.