Skip to content

Conversation

@itaybre
Copy link
Contributor

@itaybre itaybre commented Feb 9, 2026

📜 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:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Feb 9, 2026
@linear
Copy link

linear bot commented Feb 9, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2026

Semver Impact of This PR

🟢 Patch (bug fixes)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


Bug Fixes 🐛

  • Cleanup SessionReplay when maximum duration reached by itaybre in #7421
  • Cleanup SessionReplay when maximum duration reached by itaybre in #7421

Internal Changes 🔧

Deps

  • Bump getsentry/craft from 2.20.1 to 2.21.2 by dependabot in #7408
  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.20.1 to 2.21.2 by dependabot in #7409
  • Bump fastlane from 2.231.1 to 2.232.0 by dependabot in #7401

Other

  • Add CocoaPods token keep-alive workflow to maintain session validity by itaybre in #7440
  • Add SentrySwiftUI source files to Sentry by philprime in #7422
  • Update SentryAttribute to use a generic array type by itaybre in #7324
  • Update Twitter follow badge link in README.md by itaybre in #7417
  • Added 3rd party notices by itaybre in #7399
  • Add dependencies label for dependabot PRs by christophaigner in #7406
  • Check AppKit linkage macOS by itaybre in #7343

Other

  • release: 9.4.1 by itaybre in 8a7ae8c0
  • Fix App hangs report with high durations by denrase in #7354

🤖 This preview updates automatically when you update the PR.

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.325%. Comparing base (a8cd875) to head (e0303a3).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              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               
Files with missing lines Coverage Δ
...tegrations/SessionReplay/SentrySessionReplay.swift 88.510% <100.000%> (+0.098%) ⬆️
...SessionReplay/SentrySessionReplayIntegration.swift 89.958% <100.000%> (+0.214%) ⬆️

... and 18 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a8cd875...e0303a3. Read the comment docs.

…nner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration
@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1219.78 ms 1249.98 ms 30.20 ms
Size 24.14 KiB 1.11 MiB 1.09 MiB

Baseline results on branch: main

Startup times

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

@itaybre itaybre marked this pull request as ready for review February 10, 2026 15:41
Copy link

@cursor cursor bot left a 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.

…nner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration
Copy link
Member

@philprime philprime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@itaybre itaybre merged commit 70fb69e into main Feb 11, 2026
243 of 245 checks passed
@itaybre itaybre deleted the itaybrenner/cocoa-503-cocoa-sdk-does-not-discard-replayid-after-session-duration branch February 11, 2026 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code-assisted ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cocoa SDK does not discard replayId after session duration limit, causing extremely long replays

2 participants