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

[draft] fix(web): don't create runZoneGuarded on web if it already exists #2088

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

buenaflor
Copy link
Contributor

@buenaflor buenaflor commented Jun 6, 2024

📜 Description

If the sentry init is already set up in a zone, don't create another one internally

We can still keep the onError callback and propagate the user's onError on top of it so we can keep the original behaviour

💡 Motivation and Context

Fixes #1943

💚 How did you test it?

📝 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
Contributor

github-actions bot commented Jun 6, 2024

Fails
🚫 Please consider adding a changelog entry for the next release.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

- don't create runZoneGuarded on web if it already exists ([#2088](https://github.com/getsentry/sentry-dart/pull/2088))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description.

Generated by 🚫 dangerJS against f6fa1ac

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 57.14286% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.45%. Comparing base (99b37a6) to head (f6fa1ac).

Files Patch % Lines
flutter/lib/src/sentry_flutter.dart 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2088      +/-   ##
==========================================
+ Coverage   88.64%   92.45%   +3.81%     
==========================================
  Files         223       61     -162     
  Lines        7583     1922    -5661     
==========================================
- Hits         6722     1777    -4945     
+ Misses        861      145     -716     

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

Copy link
Contributor

github-actions bot commented Jun 6, 2024

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 399.60 ms 545.88 ms 146.27 ms
Size 6.35 MiB 7.34 MiB 1008.55 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
0f067d3 359.56 ms 431.28 ms 71.72 ms
4b943a1 348.17 ms 437.15 ms 88.98 ms
5aba417 355.78 ms 450.39 ms 94.61 ms
b0811cc 580.00 ms 675.69 ms 95.69 ms
04db237 330.16 ms 428.38 ms 98.22 ms
c732386 316.84 ms 390.62 ms 73.78 ms
74e1fdd 398.61 ms 418.43 ms 19.82 ms
453e1bc 320.41 ms 372.73 ms 52.32 ms
051e97a 359.56 ms 426.68 ms 67.12 ms
6fedcab 388.26 ms 487.42 ms 99.16 ms

App size

Revision Plain With Sentry Diff
0f067d3 6.33 MiB 7.30 MiB 992.08 KiB
4b943a1 6.34 MiB 7.28 MiB 968.41 KiB
5aba417 5.94 MiB 6.96 MiB 1.02 MiB
b0811cc 6.33 MiB 7.27 MiB 954.02 KiB
04db237 5.94 MiB 6.95 MiB 1.01 MiB
c732386 6.26 MiB 7.20 MiB 958.78 KiB
74e1fdd 6.33 MiB 7.27 MiB 954.12 KiB
453e1bc 5.94 MiB 6.95 MiB 1.01 MiB
051e97a 6.27 MiB 7.20 MiB 959.09 KiB
6fedcab 6.33 MiB 7.30 MiB 987.83 KiB

Previous results on branch: fix/runzoneguarded

Startup times

Revision Plain With Sentry Diff
34ea139 393.15 ms 462.71 ms 69.57 ms

App size

Revision Plain With Sentry Diff
34ea139 6.35 MiB 7.33 MiB 1005.84 KiB

Copy link
Contributor

github-actions bot commented Jun 6, 2024

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1227.00 ms 1249.88 ms 22.88 ms
Size 8.33 MiB 9.60 MiB 1.27 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
04bd9e6 1230.78 ms 1250.71 ms 19.94 ms
25161f4 1252.35 ms 1263.84 ms 11.49 ms
4656f10 1247.04 ms 1276.16 ms 29.12 ms
abcdba3 1257.31 ms 1283.49 ms 26.18 ms
2966d88 1251.76 ms 1270.21 ms 18.46 ms
333903e 1251.15 ms 1270.21 ms 19.06 ms
2a0edba 1229.27 ms 1259.54 ms 30.27 ms
89ea268 1252.33 ms 1253.58 ms 1.26 ms
50bdfad 1253.14 ms 1274.54 ms 21.40 ms
5aba417 1265.31 ms 1287.90 ms 22.59 ms

App size

Revision Plain With Sentry Diff
04bd9e6 8.33 MiB 9.61 MiB 1.27 MiB
25161f4 8.28 MiB 9.34 MiB 1.06 MiB
4656f10 8.32 MiB 9.50 MiB 1.19 MiB
abcdba3 8.15 MiB 9.12 MiB 989.76 KiB
2966d88 8.32 MiB 9.38 MiB 1.06 MiB
333903e 8.10 MiB 9.16 MiB 1.06 MiB
2a0edba 8.32 MiB 9.52 MiB 1.20 MiB
89ea268 8.09 MiB 9.16 MiB 1.06 MiB
50bdfad 8.32 MiB 9.43 MiB 1.10 MiB
5aba417 8.16 MiB 9.17 MiB 1.01 MiB

Previous results on branch: fix/runzoneguarded

Startup times

Revision Plain With Sentry Diff
34ea139 1245.20 ms 1262.00 ms 16.80 ms

App size

Revision Plain With Sentry Diff
34ea139 8.33 MiB 9.54 MiB 1.22 MiB

@buenaflor buenaflor changed the title [draft] fix: don't create runZoneGuarded on web if it already exists [draft] fix(web): don't create runZoneGuarded on web if it already exists Jun 6, 2024
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.

Zone missmatch on flutter web
1 participant