chore: cleanup replay exports for hybrid SDKs#4089
Merged
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.
|
Contributor
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
approved these changes
Jun 20, 2024
brustolin
left a comment
Contributor
There was a problem hiding this comment.
Thanks!! Easier to maintain this way.
krystofwoldrich
approved these changes
Jun 20, 2024
krystofwoldrich
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 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.