Skip to content
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

refactor: use native spotlight integrations on Flutter Android, iOS, macOS #2285

Merged
merged 10 commits into from
Sep 25, 2024

Conversation

buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Sep 12, 2024

📜 Description

use native spotlight integrations on Flutter Android, iOS, macOS

continue using the spotlight http transport on the Flutter layer for Web (as long as we don't have a JS SDK integration), Linux and Windows

💡 Motivation and Context

The idea behind this PR is to use spotlight to send envelopes as late as possible so only after we are sure this envelope is not going to be modified or serialized/deserialized again.
Currently we use a http transport decorator which happens on the Flutter layer but it might happen that the envelope is still processed afterwards which is the case for Android.

Closes #2282

💚 How did you test it?

Unit tests, local tests

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

🔮 Next steps

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.05%. Comparing base (90a08ea) to head (a310c67).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2285      +/-   ##
==========================================
+ Coverage   88.03%   88.05%   +0.01%     
==========================================
  Files         247      247              
  Lines        8585     8588       +3     
==========================================
+ Hits         7558     7562       +4     
+ Misses       1027     1026       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Sep 12, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 441.13 ms 500.27 ms 59.13 ms
Size 6.49 MiB 7.55 MiB 1.06 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c328ffc 394.35 ms 480.94 ms 86.59 ms
5e8d2b3 342.17 ms 375.83 ms 33.66 ms
8d64376 302.88 ms 356.84 ms 53.96 ms
4477d2e 392.75 ms 472.69 ms 79.94 ms
9811573 309.76 ms 402.60 ms 92.84 ms
31b2afb 397.04 ms 475.09 ms 78.04 ms
d0312c9 354.78 ms 411.53 ms 56.75 ms
1c6eb5b 350.69 ms 393.86 ms 43.17 ms
2331d89 352.45 ms 417.34 ms 64.89 ms
7f2b01d 304.94 ms 345.71 ms 40.78 ms

App size

Revision Plain With Sentry Diff
c328ffc 6.35 MiB 7.42 MiB 1.07 MiB
5e8d2b3 6.15 MiB 7.13 MiB 1000.11 KiB
8d64376 5.94 MiB 6.96 MiB 1.02 MiB
4477d2e 6.33 MiB 7.26 MiB 950.38 KiB
9811573 5.94 MiB 6.96 MiB 1.02 MiB
31b2afb 6.34 MiB 7.28 MiB 966.36 KiB
d0312c9 6.33 MiB 7.26 MiB 949.76 KiB
1c6eb5b 5.94 MiB 6.92 MiB 1001.53 KiB
2331d89 5.94 MiB 6.96 MiB 1.02 MiB
7f2b01d 5.94 MiB 6.95 MiB 1.01 MiB

Previous results on branch: ref/spotlight-native

Startup times

Revision Plain With Sentry Diff
4b62e33 476.09 ms 507.96 ms 31.87 ms
c024226 475.24 ms 508.22 ms 32.99 ms
002c9f7 467.65 ms 508.90 ms 41.24 ms
c107ffb 466.15 ms 504.35 ms 38.20 ms
f11d041 443.64 ms 495.29 ms 51.66 ms

App size

Revision Plain With Sentry Diff
4b62e33 6.49 MiB 7.55 MiB 1.07 MiB
c024226 6.49 MiB 7.55 MiB 1.07 MiB
002c9f7 6.49 MiB 7.55 MiB 1.07 MiB
c107ffb 6.49 MiB 7.55 MiB 1.07 MiB
f11d041 6.49 MiB 7.55 MiB 1.07 MiB

Copy link
Contributor

github-actions bot commented Sep 12, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1229.67 ms 1246.80 ms 17.13 ms
Size 8.38 MiB 9.73 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
c3e6c82 1256.93 ms 1276.17 ms 19.24 ms
a7acb24 1296.71 ms 1317.69 ms 20.98 ms
280ab9f 1255.71 ms 1262.78 ms 7.06 ms
0be962b 1264.10 ms 1281.16 ms 17.06 ms
7f75f32 1230.80 ms 1251.79 ms 20.99 ms
014c3ea 1298.73 ms 1351.24 ms 52.51 ms
9811573 1259.78 ms 1278.33 ms 18.55 ms
b47809a 1252.61 ms 1278.57 ms 25.96 ms
f172c4d 1350.66 ms 1408.49 ms 57.83 ms
6f3717a 1259.84 ms 1280.90 ms 21.06 ms

App size

Revision Plain With Sentry Diff
c3e6c82 8.32 MiB 9.38 MiB 1.06 MiB
a7acb24 8.16 MiB 9.17 MiB 1.01 MiB
280ab9f 8.29 MiB 9.39 MiB 1.10 MiB
0be962b 8.10 MiB 9.16 MiB 1.07 MiB
7f75f32 8.28 MiB 9.33 MiB 1.05 MiB
014c3ea 8.33 MiB 9.39 MiB 1.06 MiB
9811573 8.16 MiB 9.17 MiB 1.01 MiB
b47809a 8.16 MiB 9.17 MiB 1.01 MiB
f172c4d 8.33 MiB 9.62 MiB 1.29 MiB
6f3717a 8.33 MiB 9.62 MiB 1.29 MiB

Previous results on branch: ref/spotlight-native

Startup times

Revision Plain With Sentry Diff
c107ffb 1246.88 ms 1270.66 ms 23.78 ms
002c9f7 1247.71 ms 1267.65 ms 19.93 ms
c024226 1253.84 ms 1274.27 ms 20.43 ms
4b62e33 1255.57 ms 1282.50 ms 26.93 ms
f11d041 1250.25 ms 1280.87 ms 30.62 ms

App size

Revision Plain With Sentry Diff
c107ffb 8.38 MiB 9.73 MiB 1.36 MiB
002c9f7 8.38 MiB 9.73 MiB 1.36 MiB
c024226 8.38 MiB 9.74 MiB 1.36 MiB
4b62e33 8.38 MiB 9.73 MiB 1.36 MiB
f11d041 8.38 MiB 9.73 MiB 1.36 MiB

@buenaflor buenaflor marked this pull request as ready for review September 12, 2024 19:30
@buenaflor buenaflor merged commit 8a111a9 into main Sep 25, 2024
134 checks passed
@buenaflor buenaflor deleted the ref/spotlight-native branch September 25, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor Spotlight to use native android and cocoa Spotlight integrations when using Flutter
2 participants