getsentry / sentry-react-native

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

feat(core): Drop dev server spans #4271

Closed antonis closed 4 days ago

antonis commented 1 week ago

:loudspeaker: Type of change

:scroll: Description

Filters out development server spans using the shouldCreateSpanForRequest option.

:bulb: Motivation and Context

Fixes https://github.com/getsentry/sentry-react-native/issues/3210

:green_heart: How did you test it?

Manual testing, Unit tests

:pencil: Checklist

:crystal_ball: Next steps

github-actions[bot] commented 1 week ago

Android (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 364.80 ms 423.88 ms 59.08 ms
Size 7.15 MiB 8.35 MiB 1.20 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
70caa604a66a0a191f272363d4dd04d6f5950ba1+dirty 308.83 ms 393.06 ms 84.23 ms
2ec71da2fbe36565c59c20f960c72fc75737275c+dirty 375.64 ms 431.59 ms 55.95 ms
8c88ac762793289e8bff7071fed62020f14f350e+dirty 402.72 ms 434.32 ms 31.60 ms
728164bd341a3b0e14876d86101c4bcca5b1f1ed+dirty 335.93 ms 342.94 ms 7.01 ms
acadc0f974a0c234a3d9010117b076792d14d6e8+dirty 259.04 ms 304.67 ms 45.63 ms
d0bf49472b8e02ea40eab48e2e861b603450233e+dirty 253.73 ms 308.23 ms 54.49 ms
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 267.21 ms 325.24 ms 58.04 ms
e540498478edf6f59bd7e731809a3ea6409dcc1c+dirty 408.56 ms 480.00 ms 71.44 ms
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 363.39 ms 414.78 ms 51.39 ms
6e8584e8f1988b33cc24c85f32711c91358905fa+dirty 383.37 ms 400.84 ms 17.47 ms

App size

Revision Plain With Sentry Diff
70caa604a66a0a191f272363d4dd04d6f5950ba1+dirty 7.15 MiB 8.03 MiB 901.79 KiB
2ec71da2fbe36565c59c20f960c72fc75737275c+dirty 7.15 MiB 8.38 MiB 1.23 MiB
8c88ac762793289e8bff7071fed62020f14f350e+dirty 7.15 MiB 8.35 MiB 1.20 MiB
728164bd341a3b0e14876d86101c4bcca5b1f1ed+dirty 7.15 MiB 8.12 MiB 997.71 KiB
acadc0f974a0c234a3d9010117b076792d14d6e8+dirty 7.15 MiB 8.03 MiB 903.20 KiB
d0bf49472b8e02ea40eab48e2e861b603450233e+dirty 7.15 MiB 8.04 MiB 910.85 KiB
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 7.15 MiB 8.09 MiB 962.69 KiB
e540498478edf6f59bd7e731809a3ea6409dcc1c+dirty 7.15 MiB 8.38 MiB 1.23 MiB
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 7.15 MiB 8.35 MiB 1.20 MiB
6e8584e8f1988b33cc24c85f32711c91358905fa+dirty 7.15 MiB 8.13 MiB 1002.18 KiB

Previous results on branch: antonis/drop-dev-server-spans

Startup times

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7+dirty 394.36 ms 445.27 ms 50.91 ms
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e+dirty 409.73 ms 479.62 ms 69.89 ms
4fb3780f39e0700c6c3253131b471fea26a5833e+dirty 371.15 ms 403.76 ms 32.60 ms

App size

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

iOS (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1203.09 ms 1207.52 ms 4.43 ms
Size 2.36 MiB 3.10 MiB 753.45 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
457e29fc08e6edbebee646d095513d72728a5756+dirty 1253.94 ms 1269.18 ms 15.24 ms
d43a46b7be9152b013c84185112b1179619f8c86+dirty 1219.24 ms 1219.65 ms 0.41 ms
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 1230.63 ms 1234.83 ms 4.20 ms
9c48b2c9eb6422d8d51fcf56b1b4ab7841d2ec8a+dirty 1246.96 ms 1255.73 ms 8.77 ms
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 1236.18 ms 1235.04 ms -1.14 ms
3853f4362ec819042552ffa9ed30e8f6627e60bf+dirty 1221.82 ms 1242.64 ms 20.82 ms
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 1219.34 ms 1221.25 ms 1.91 ms
544699261cd72e3efc1259ba66b138f5f70a05ed+dirty 1273.28 ms 1276.68 ms 3.40 ms
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 1276.70 ms 1300.07 ms 23.37 ms
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 1230.02 ms 1227.62 ms -2.40 ms

App size

Revision Plain With Sentry Diff
457e29fc08e6edbebee646d095513d72728a5756+dirty 2.36 MiB 2.87 MiB 520.67 KiB
d43a46b7be9152b013c84185112b1179619f8c86+dirty 2.36 MiB 3.08 MiB 734.25 KiB
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 2.36 MiB 3.10 MiB 753.14 KiB
9c48b2c9eb6422d8d51fcf56b1b4ab7841d2ec8a+dirty 2.36 MiB 2.85 MiB 495.77 KiB
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 2.36 MiB 3.08 MiB 736.63 KiB
3853f4362ec819042552ffa9ed30e8f6627e60bf+dirty 2.36 MiB 2.85 MiB 499.81 KiB
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 2.36 MiB 3.14 MiB 793.36 KiB
544699261cd72e3efc1259ba66b138f5f70a05ed+dirty 2.36 MiB 2.88 MiB 531.94 KiB
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 2.36 MiB 2.85 MiB 496.81 KiB
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 2.36 MiB 3.10 MiB 752.42 KiB

Previous results on branch: antonis/drop-dev-server-spans

Startup times

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7+dirty 1232.47 ms 1242.38 ms 9.91 ms
4fb3780f39e0700c6c3253131b471fea26a5833e+dirty 1243.47 ms 1245.06 ms 1.59 ms
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e+dirty 1236.12 ms 1231.77 ms -4.35 ms

App size

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7+dirty 2.36 MiB 3.10 MiB 752.47 KiB
4fb3780f39e0700c6c3253131b471fea26a5833e+dirty 2.36 MiB 3.10 MiB 752.22 KiB
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e+dirty 2.36 MiB 3.10 MiB 752.22 KiB
github-actions[bot] commented 1 week ago

iOS (new) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1238.94 ms 1245.60 ms 6.67 ms
Size 2.92 MiB 3.66 MiB 758.65 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
457e29fc08e6edbebee646d095513d72728a5756+dirty 1256.71 ms 1258.50 ms 1.79 ms
d43a46b7be9152b013c84185112b1179619f8c86+dirty 1223.31 ms 1230.92 ms 7.61 ms
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 1229.17 ms 1227.64 ms -1.54 ms
9c48b2c9eb6422d8d51fcf56b1b4ab7841d2ec8a+dirty 1253.39 ms 1256.30 ms 2.91 ms
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 1223.63 ms 1227.98 ms 4.35 ms
3853f4362ec819042552ffa9ed30e8f6627e60bf+dirty 1271.74 ms 1278.04 ms 6.30 ms
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 1233.94 ms 1226.29 ms -7.65 ms
544699261cd72e3efc1259ba66b138f5f70a05ed+dirty 1249.94 ms 1254.80 ms 4.86 ms
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 1252.52 ms 1254.08 ms 1.56 ms
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 1233.67 ms 1229.52 ms -4.15 ms

App size

Revision Plain With Sentry Diff
457e29fc08e6edbebee646d095513d72728a5756+dirty 2.92 MiB 3.43 MiB 524.75 KiB
d43a46b7be9152b013c84185112b1179619f8c86+dirty 2.92 MiB 3.64 MiB 740.29 KiB
e5bc97b850117530a0b5a1fd7728fcf3909efb04+dirty 2.92 MiB 3.66 MiB 758.40 KiB
9c48b2c9eb6422d8d51fcf56b1b4ab7841d2ec8a+dirty 2.92 MiB 3.41 MiB 499.97 KiB
c639edf12520d1afee79e1ff2ba18df03ce70ec3+dirty 2.92 MiB 3.64 MiB 742.55 KiB
3853f4362ec819042552ffa9ed30e8f6627e60bf+dirty 2.92 MiB 3.41 MiB 503.54 KiB
52c056204eb6a8e4fe6e138e9307f2838242b4a6+dirty 2.92 MiB 3.69 MiB 794.15 KiB
544699261cd72e3efc1259ba66b138f5f70a05ed+dirty 2.92 MiB 3.44 MiB 535.26 KiB
0677344f8502b3ae15a3128bf239cf5571b92443+dirty 2.92 MiB 3.41 MiB 500.94 KiB
8ae23a70cf23a4f7a3c54784f496e7af813b7a48+dirty 2.92 MiB 3.66 MiB 757.67 KiB

Previous results on branch: antonis/drop-dev-server-spans

Startup times

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7+dirty 1218.67 ms 1217.96 ms -0.71 ms
4fb3780f39e0700c6c3253131b471fea26a5833e+dirty 1228.67 ms 1225.65 ms -3.02 ms
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e+dirty 1240.06 ms 1246.98 ms 6.92 ms

App size

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7+dirty 2.92 MiB 3.66 MiB 756.96 KiB
4fb3780f39e0700c6c3253131b471fea26a5833e+dirty 2.92 MiB 3.66 MiB 756.82 KiB
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e+dirty 2.92 MiB 3.66 MiB 756.80 KiB
github-actions[bot] commented 1 week ago

Android (legacy) Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 466.84 ms 472.96 ms 6.12 ms
Size 17.74 MiB 20.08 MiB 2.34 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
70caa604a66a0a191f272363d4dd04d6f5950ba1+dirty 299.00 ms 321.02 ms 22.02 ms
fe135918376819714679fec8bf2bb2e1f07ec64b 478.92 ms 480.84 ms 1.92 ms
4cc5c276b8e06761211f41601792dfcbfc7dd854 460.04 ms 496.32 ms 36.28 ms
cdf2f334f8389e9747b61d338d9ba8945027b0d1 469.46 ms 462.17 ms -7.29 ms
d43a46b7be9152b013c84185112b1179619f8c86 454.22 ms 477.79 ms 23.57 ms
acadc0f974a0c234a3d9010117b076792d14d6e8+dirty 373.24 ms 381.51 ms 8.27 ms
5a22220fafc6352a2e07e20943dda325a4cf67f5 412.38 ms 447.35 ms 34.97 ms
d0bf49472b8e02ea40eab48e2e861b603450233e+dirty 375.37 ms 395.14 ms 19.77 ms
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 332.90 ms 352.45 ms 19.55 ms
0d3e6775185b3030074b2bca3cb796e5d265910b 422.82 ms 411.90 ms -10.92 ms

App size

Revision Plain With Sentry Diff
70caa604a66a0a191f272363d4dd04d6f5950ba1+dirty 17.73 MiB 19.75 MiB 2.01 MiB
fe135918376819714679fec8bf2bb2e1f07ec64b 17.74 MiB 20.07 MiB 2.34 MiB
4cc5c276b8e06761211f41601792dfcbfc7dd854 17.73 MiB 19.95 MiB 2.21 MiB
cdf2f334f8389e9747b61d338d9ba8945027b0d1 17.74 MiB 20.08 MiB 2.34 MiB
d43a46b7be9152b013c84185112b1179619f8c86 17.73 MiB 20.06 MiB 2.33 MiB
acadc0f974a0c234a3d9010117b076792d14d6e8+dirty 17.73 MiB 19.75 MiB 2.01 MiB
5a22220fafc6352a2e07e20943dda325a4cf67f5 17.73 MiB 19.93 MiB 2.20 MiB
d0bf49472b8e02ea40eab48e2e861b603450233e+dirty 17.73 MiB 19.75 MiB 2.02 MiB
86d6d2c81bc42209de70f7f3b97a1fbbde04025f+dirty 17.73 MiB 20.04 MiB 2.31 MiB
0d3e6775185b3030074b2bca3cb796e5d265910b 17.74 MiB 20.07 MiB 2.34 MiB

Previous results on branch: antonis/drop-dev-server-spans

Startup times

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7 467.49 ms 461.06 ms -6.43 ms
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e 477.83 ms 512.89 ms 35.06 ms
4fb3780f39e0700c6c3253131b471fea26a5833e 508.12 ms 498.46 ms -9.66 ms

App size

Revision Plain With Sentry Diff
a3b7a1a6727c4283fc43fdc51cf79f7d75c212c7 17.74 MiB 20.08 MiB 2.34 MiB
db6b5be369f5062bfa10ff5a69b1d5c2b5e5598e 17.74 MiB 20.08 MiB 2.34 MiB
4fb3780f39e0700c6c3253131b471fea26a5833e 17.74 MiB 20.08 MiB 2.34 MiB
github-actions[bot] commented 1 week ago
Messages
:book: Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by :no_entry_sign: dangerJS against 241c8e67b459fdcdf92bfb9ef2a2404c1b76666c

lucas-zimerman commented 1 week ago

Overall, the PR looks good, but I have some concerns when devserver doesn't exist. Thank you for the contribution!