Skip to content

feat: Add network details for session replay on iOS#4891

Open
jamescrosswell wants to merge 29 commits intomainfrom
ios-performance-spans
Open

feat: Add network details for session replay on iOS#4891
jamescrosswell wants to merge 29 commits intomainfrom
ios-performance-spans

Conversation

@jamescrosswell
Copy link
Copy Markdown
Collaborator

@jamescrosswell jamescrosswell commented Feb 3, 2026

Resolves #4890:

Remarks

There are a couple of things about this PR that make me nervous:

  1. To enable Session Replay on iOS, we have to disable session tracking in the .NET SDK (otherwise we end up with duplicate sessions)
  2. For this to work on iOS 26.0 or later (with liquid glass) the user would need to enable EnableSessionReplayInUnreliableEnvironment

I'd recommend we leave this experimental for quite some time to try to get a feel for whether either of these things is going to be a deal breaker.

Example

image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 3, 2026

Fails
🚫 Please consider adding a changelog entry for the next release.
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Instructions and example for changelog

Please add an entry to CHANGELOG.md to the "Unreleased" section. Make sure the entry includes this PR's number.

Example:

## Unreleased

### Features

- Add network details for session replay on iOS ([#4891](https://github.com/getsentry/sentry-dotnet/pull/4891))

If none of the above apply, you can opt out of this check by adding #skip-changelog to the PR description or adding a skip-changelog label.

Generated by 🚫 dangerJS against 9622e62

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.01%. Comparing base (bcc6476) to head (43fd75b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4891   +/-   ##
=======================================
  Coverage   74.01%   74.01%           
=======================================
  Files         499      499           
  Lines       18065    18066    +1     
  Branches     3518     3518           
=======================================
+ Hits        13370    13372    +2     
+ Misses       3836     3835    -1     
  Partials      859      859           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Base automatically changed from replay-network-spans to main February 25, 2026 20:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 17, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

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


Breaking Changes 🛠

  • The _Metrics_ APIs are now stable: removed Experimental from SentrySdk, SentryOptions and IHub by Flash0ver in #5023

Features ✨

  • Report a new _Diagnostic_ (SENTRY1001) when a Metrics-API is invoked with an unsupported numeric type by Flash0ver in #4840
  • feat: Add network details for session replay on iOS by jamescrosswell in #4891

Fixes 🐛

  • fix: include Data set via ITransactionTracer in SentryTransaction by Flash0ver in #4148
  • fix: CaptureFeedback now applies event processors by jamescrosswell in #4942

Dependencies ⬆️

Deps

  • chore(deps): update Java SDK to v8.36.0 by github-actions in #5036
  • chore(deps): update epitaph to 0.1.1 by github-actions in #5036
  • chore(deps): update Native SDK to v0.13.3 by github-actions in #5045
  • chore(deps): update Cocoa SDK to v9.7.0 by github-actions in #5015
  • chore(deps): update Java SDK to v8.35.0 by github-actions in #5017
  • chore(deps): replaced the heavy protobuf-javalite 3.25.8 dependency with a light-weight epitaph 0.1.0 alternative on Android (getsentry/sentry-java#5157) by github-actions in #5017
  • chore(deps): update CLI to v3.3.3 by github-actions in #5002
  • chore(deps): update Cocoa SDK to v9.6.0 by github-actions in #4958

Other

  • ref: Use .NET 6.0 ArgumentNullException throw helpers by copilot-swe-agent in #4985

🤖 This preview updates automatically when you update the PR.

@jamescrosswell jamescrosswell marked this pull request as ready for review March 23, 2026 07:34
Copy link
Copy Markdown

@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 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: ToCocoaBreadcrumbData is never called in production code
    • BreadcrumbExtensions.ToCocoaBreadcrumb now uses ToCocoaBreadcrumbData, so request_start is converted to NSDate for Cocoa Session Replay network breadcrumb parsing.

Create PR

Or push these changes by commenting:

@cursor push d93cff9153
Preview (d93cff9153)
diff --git a/src/Sentry/Platforms/Cocoa/Extensions/BreadcrumbExtensions.cs b/src/Sentry/Platforms/Cocoa/Extensions/BreadcrumbExtensions.cs
--- a/src/Sentry/Platforms/Cocoa/Extensions/BreadcrumbExtensions.cs
+++ b/src/Sentry/Platforms/Cocoa/Extensions/BreadcrumbExtensions.cs
@@ -19,7 +19,7 @@
             Timestamp = breadcrumb.Timestamp.ToNSDate(),
             Message = breadcrumb.Message,
             Type = breadcrumb.Type,
-            Data = breadcrumb.Data?.ToNullableNSDictionary(),
+            Data = breadcrumb.Data?.ToCocoaBreadcrumbData(),
             Category = breadcrumb.Category ?? "",
             Level = breadcrumb.Level.ToCocoaSentryLevel()
         };

This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Associate Network traffic with Session Replays on iOS

2 participants