-
-
Notifications
You must be signed in to change notification settings - Fork 378
fix: Cleanup SessionReplay when maximum duration reached #7421
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
fix: Cleanup SessionReplay when maximum duration reached #7421
Conversation
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Bug Fixes 🐛
Internal Changes 🔧Deps
Other
Other
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7421 +/- ##
=============================================
+ Coverage 85.319% 85.325% +0.006%
=============================================
Files 480 480
Lines 28616 28622 +6
Branches 12456 12389 -67
=============================================
+ Hits 24415 24422 +7
+ Misses 4154 4153 -1
Partials 47 47
... and 18 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
…nner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 79cee27 | 1214.65 ms | 1238.66 ms | 24.01 ms |
| 64a365a | 1225.60 ms | 1255.49 ms | 29.89 ms |
| 83bf9af | 1213.30 ms | 1234.18 ms | 20.89 ms |
| 795e128 | 1216.68 ms | 1245.83 ms | 29.15 ms |
| d540ef3 | 1214.37 ms | 1241.06 ms | 26.69 ms |
| 29f846e | 1210.51 ms | 1238.66 ms | 28.15 ms |
| fee8669 | 1220.50 ms | 1231.84 ms | 11.34 ms |
| 98a16ef | 1227.45 ms | 1258.19 ms | 30.74 ms |
| ee272e8 | 1210.98 ms | 1245.10 ms | 34.12 ms |
| dbf22c2 | 1214.19 ms | 1241.67 ms | 27.48 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 79cee27 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| 64a365a | 24.14 KiB | 1.09 MiB | 1.06 MiB |
| 83bf9af | 24.14 KiB | 1.04 MiB | 1.02 MiB |
| 795e128 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| d540ef3 | 24.14 KiB | 1.07 MiB | 1.04 MiB |
| 29f846e | 24.14 KiB | 1.07 MiB | 1.04 MiB |
| fee8669 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| 98a16ef | 24.14 KiB | 1.09 MiB | 1.07 MiB |
| ee272e8 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| dbf22c2 | 24.14 KiB | 1.06 MiB | 1.04 MiB |
Previous results on branch: itaybrenner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 977b404 | 1211.79 ms | 1239.50 ms | 27.71 ms |
| 4485f79 | 1213.75 ms | 1243.38 ms | 29.63 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 977b404 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
| 4485f79 | 24.14 KiB | 1.10 MiB | 1.08 MiB |
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.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Sources/Swift/Integrations/SessionReplay/SentrySessionReplayIntegration.swift
Show resolved
Hide resolved
Sources/Swift/Integrations/SessionReplay/SentrySessionReplayIntegration.swift
Show resolved
Hide resolved
…nner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration
philprime
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.
LGTM
📜 Description
Cleanup session replay Id once the replay reached the maximum duration
Fixes: #5756
💡 Motivation and Context
Session replay were paused after reaching the maximum duration but the replay Id was not cleared, thus events long after the recording were linked to it.
💚 How did you test it?
📝 Checklist
You have to check all boxes before merging:
sendDefaultPIIis enabled.