Skip to content
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

Public API for manual replay control #78018

Open
1 of 5 tasks
Tracked by #74441
romtsn opened this issue Sep 24, 2024 · 8 comments
Open
1 of 5 tasks
Tracked by #74441

Public API for manual replay control #78018

romtsn opened this issue Sep 24, 2024 · 8 comments

Comments

@romtsn
Copy link
Member

romtsn commented Sep 24, 2024

Similarly to web replays, we should provide public API for controlling replay behavior manually:

  • start/startBuffering should start recording a replay regardless of sample rates set, with the corresponding mode
  • stop should stop the replay and send it to sentry
  • flush should flush all pending segments/frames to sentry

start/stop current Replay

Preview Give feedback
  1. Platform: React-Native Session Replay
  2. Platform: Dart Session Replay

There's also interest in permanently deactivating SR after SDK init, e.g. as described here: - getsentry/sentry-cocoa#4833

@cmanallen
Copy link
Member

@romtsn Is this done?

@romtsn
Copy link
Member Author

romtsn commented Dec 10, 2024

@cmanallen only on iOS I think, no other platform

@billyvg
Copy link
Member

billyvg commented Dec 11, 2024

We should probably add these to the other platforms before GA so that our APIs are consistent.

@philipphofmann
Copy link
Member

If possible, aligning the API for starting/stopping and pausing/resuming SR with continuous profiling could make sense. In other words, those keywords for SR and profiling should do similar things because otherwise, it could confuse users.

@rf-westhuizen
Copy link

Is it possible to conditionally include replay data in events sent to Sentry using the options.beforeSend callback? Specifically, I'd like to include replay data only for error-level events, while removing it from info, debug, and other non-error event types. What would be the proper approach?

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Feb 17, 2025
@romtsn
Copy link
Member Author

romtsn commented Feb 17, 2025

@rf-westhuizen what SDK? It's a little bit tricky to do that given there's currently no direct connection between error events and replay events (they are send separately in different envelopes, and only being connected through a special envelope header). Do you use sessionSampleRate or onErrorSampleRate?

@rf-westhuizen
Copy link

@romtsn

I'm using sentry_flutter (8.13.0).
I keep the options.experimental.replay.onErrorSampleRate = 1.0; and played around with options.experimental.replay.sessionSampleRate = 0.1;

@getsantry
Copy link
Contributor

getsantry bot commented Feb 26, 2025

Routing to @getsentry/product-owners-replays for triage ⏲️

@kahest kahest moved this from Needs Discussion to Backlog in Mobile & Cross Platform SDK Mar 5, 2025
@gaprl gaprl removed the Migrated label Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Backlog
Development

No branches or pull requests

7 participants