getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
763 stars 239 forks source link

Control video length or specific timing on Session Replay #2416

Open kimwest00 opened 4 days ago

kimwest00 commented 4 days ago

Problem Statement

Can I control recording session length or record timing? When testing Session Replay, I enable 'onErrorSampleRate' to test session playback, it is recorded continuously when the user is in the foreground state.

So I wonder if there any plan for developing function of control session replay recording max length or timing (e.g. recording session only specific error)

Solution Brainstorm

No response

Are you willing to submit a PR?

None

kimwest00 commented 4 days ago

Additionally, Is it intentional function that recording whole session that users in foregorund, even though activate only onErrorSampleRate?

buenaflor commented 4 days ago

cc @vaind

vaind commented 2 days ago

Can I control recording session length or record timing?

Currently, these controls are not yet available. We'll update the issue if anything changes in this regard.

vaind commented 2 days ago

Additionally, Is it intentional function that recording whole session that users in foregorund, even though activate only onErrorSampleRate?

What do you mean? Do you see whole session replays in Sentry while you have session replay disabled?

kimwest00 commented 1 day ago

What do you mean? Do you see whole session replays in Sentry while you have session replay disabled?

No, I wonder that are there any plans to enhance the Session Replay feature with onErrorSampleRate to record only a brief segment before and after an error occurs, rather than capturing the entire video while the user is in the foreground state.

I think this approach would help in more efficiently understanding user behavior patterns surrounding errors. Additionally, I concern that longer video recording times might lead to performance issues. So Can I ask that how is this being addressed?

vaind commented 1 day ago

Additionally, �I concern that longer video recording times might lead to performance issues. So Can I ask that how is this being addressed?

In order to be able to provide replay prior to an error, the only way is to actually record all the time and use the recording when an error occurs. Without recording all the time, we couldn't have any recording prior to an error (as we can't know when an error will occur).

kimwest00 commented 18 hours ago

Thank you for reply:) Then does onErrorSampleRate work the same way as sessionSampleRate? I understand that onErrorSampleRate only records when an error occurs, which is different from sessionSampleRate

vaind commented 11 hours ago

From the recording point of view, yes, it works the same. However, the replay is only sent to Sentry when an error occurs.