fix(session-replay): Use low priority queue for dispatch queue wrapper#5280
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5280 +/- ##
=============================================
- Coverage 92.899% 92.894% -0.005%
=============================================
Files 688 688
Lines 86275 86277 +2
Branches 31202 31207 +5
=============================================
- Hits 80149 80147 -2
- Misses 6026 6028 +2
- Partials 100 102 +2
... and 14 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Contributor
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2172278 | 1229.58 ms | 1245.00 ms | 15.42 ms |
| 8aec30e | 1235.73 ms | 1255.87 ms | 20.14 ms |
| 7fe37ab | 1228.92 ms | 1243.86 ms | 14.94 ms |
| 005bb4c | 1237.38 ms | 1255.54 ms | 18.16 ms |
| 1ae5768 | 1232.08 ms | 1248.16 ms | 16.08 ms |
| cb5c79c | 1229.31 ms | 1251.92 ms | 22.61 ms |
| ee8b48f | 1196.80 ms | 1213.48 ms | 16.68 ms |
| 455619d | 1231.40 ms | 1237.70 ms | 6.30 ms |
| 45d3ca5 | 1248.27 ms | 1255.48 ms | 7.21 ms |
| 39b1c35 | 1235.90 ms | 1257.37 ms | 21.47 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2172278 | 21.58 KiB | 542.28 KiB | 520.70 KiB |
| 8aec30e | 21.58 KiB | 616.75 KiB | 595.17 KiB |
| 7fe37ab | 21.58 KiB | 542.28 KiB | 520.70 KiB |
| 005bb4c | 20.76 KiB | 419.70 KiB | 398.94 KiB |
| 1ae5768 | 21.58 KiB | 655.72 KiB | 634.14 KiB |
| cb5c79c | 22.30 KiB | 730.30 KiB | 708.00 KiB |
| ee8b48f | 21.58 KiB | 418.70 KiB | 397.11 KiB |
| 455619d | 20.76 KiB | 432.87 KiB | 412.11 KiB |
| 45d3ca5 | 20.76 KiB | 427.54 KiB | 406.78 KiB |
| 39b1c35 | 22.85 KiB | 408.88 KiB | 386.03 KiB |
philprime
approved these changes
May 22, 2025
Member
philprime
left a comment
There was a problem hiding this comment.
LGTM, thank you for the investigation!
Contributor
Author
|
Note that the CocoaPods Integration Tests also fail on |
Member
|
@antonis I went ✅ after restart, so should be fine to merge |
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
Uses low-priority instead of background queues to reduce the chance of session replay internal multi-threading processes being dropped.
💡 Motivation and Context
While bumping the Cocoa SDK to v8.51.0 in React Native that contained the improved internal multi-threading of session replay we noticed that the Session Replay E2E tests were failing on iOS. Further investigation showed that the session replay processes were not being executed due to the
QOS_CLASS_BACKGROUNDpriority on the CI environment that has limited resources. Bumping the priority to low (QOS_CLASS_UTILITY) worked as expected without compromising the improvements introduced in #5018Note that locally on a dev machine the mentioned E2E tests do pass and we haven't managed to reproduce this edge case on a device or emulator.
💚 How did you test it?
Manual, CI
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.