-
-
Notifications
You must be signed in to change notification settings - Fork 372
chore: cleanup replay exports for hybrid SDKs #4089
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4089 +/- ##
=============================================
+ Coverage 91.065% 91.113% +0.047%
=============================================
Files 610 610
Lines 47750 47812 +62
=============================================
+ Hits 43484 43563 +79
+ Misses 4266 4249 -17
... and 16 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3b782cc | 1261.67 ms | 1272.24 ms | 10.57 ms |
| 2172278 | 1229.58 ms | 1245.00 ms | 15.42 ms |
| ed68562 | 1238.45 ms | 1251.57 ms | 13.12 ms |
| 965db8a | 1211.61 ms | 1226.60 ms | 14.99 ms |
| 06548c0 | 1225.58 ms | 1244.70 ms | 19.12 ms |
| c0c1496 | 1201.19 ms | 1228.36 ms | 27.17 ms |
| f938d24 | 1223.26 ms | 1242.12 ms | 18.86 ms |
| ecd9ecd | 1241.28 ms | 1260.35 ms | 19.07 ms |
| 42ef6ba | 1211.20 ms | 1228.17 ms | 16.96 ms |
| f0283e8 | 1245.92 ms | 1262.82 ms | 16.90 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3b782cc | 20.76 KiB | 432.21 KiB | 411.45 KiB |
| 2172278 | 21.58 KiB | 542.28 KiB | 520.70 KiB |
| ed68562 | 22.84 KiB | 403.24 KiB | 380.39 KiB |
| 965db8a | 22.84 KiB | 403.24 KiB | 380.39 KiB |
| 06548c0 | 20.76 KiB | 427.35 KiB | 406.59 KiB |
| c0c1496 | 22.85 KiB | 407.45 KiB | 384.60 KiB |
| f938d24 | 20.76 KiB | 434.88 KiB | 414.12 KiB |
| ecd9ecd | 20.76 KiB | 420.23 KiB | 399.47 KiB |
| 42ef6ba | 21.58 KiB | 417.86 KiB | 396.28 KiB |
| f0283e8 | 20.76 KiB | 393.37 KiB | 372.61 KiB |
brustolin
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.
Thanks!! Easier to maintain this way.
krystofwoldrich
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.
Looks good, will be much easier in the future, but we should still log out when the replay is not available in RN code.
Thank you.
philipphofmann
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.
Thank you @vaind 💯
📜 Description
This exposes a define
SENTRY_TARGET_REPLAY_SUPPORTED(there's alreadySENTRY_TARGET_PROFILING_SUPPORTEDso keeping the name format) for hybrid SDKs so they don't have to copy the specific checkSENTRY_HAS_UIKIT && !TARGET_OS_VISIONwhich may change in the future, e.g. when replay for macOS is made available. Also, while adding this, I've noticed that some replay functions were exported & then logged a warning if replay wasn't available, while some were not exported at all (see link below for the RN PR). I've unified this so that no functions are exported for hybrid SDKs if replay is not available.💡 Motivation and Context
Came up in a compilation fail for RN getsentry/sentry-react-native#3846 (comment)
💚 How did you test it?
All the original code & tests should pass. Except for tests that tried if the interfaces didn't throw when replay isn't available, obviously, since those are removed now.
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.🔮 Next steps
Use this new define in RN and Flutter.
#skip-changelog because this change isn't for normal SDK consumers.