You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MAUI: errors captured in C# never send the on-error session replay #5998
On Android and iOS, MAUI records session replays through the native SDKs. With OnErrorSampleRate (buffer mode), the native SDK keeps the last 30 seconds and uploads them only when it captures an error itself. An exception captured in C# goes through the .NET SentryClient instead, so the native SDK never hears about it and the buffered replay is never sent.
#5990 adds a hook to SentryClient (IReplaySession.CaptureReplay), and getsentry/sentry-unity#2948 uses it for Unity. MAUI still needs three things:
The built-in session has to capture natively. Implement CaptureReplay in ReplaySession:
Android: ReplayController.captureReplay, which returns the replay id as of sentry-java 8.65.0.
iOS: SentryObjCInternalReplayApi.capture, then read replayId. That interface isn't in the Cocoa bindings yet.
The client has to use the built-in session. The hook returns early unless options.ReplaySession is set, so MAUI never reaches it.
Android reports a replay id while it is only buffering.ReplaySession.ActiveReplayId reads ReplayController.ReplayId. sentry-java sets that id as soon as buffering starts, so in buffer mode MAUI Android events probably point at a replay that is never uploaded. Read the native scope's replay id instead, like Unity's AndroidReplaySession does. iOS already reads the scope.
Activity
linear-code commentedon Nov 24, 2026
NET-955