-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replay): Do not restart replays on "keydown" #8226
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
feat(replay): Do not restart replays on "keydown" #8226
Conversation
This is causing some low-value replays. If you search sentry for replays with duration < 5 seconds, you will see that most of them are re-newed sessions from idle that only have a "keydown" breadcrumb. I suspect users are alt-tabbing out of an idle Sentry page. Removing for now until we have a better way to detect when a session is truly resumed via keydown event.
size-limit report 📦
|
@@ -12,8 +12,9 @@ export function handleKeyboardEvent(replay: ReplayContainer, event: KeyboardEven | |||
return; | |||
} | |||
|
|||
replay.triggerUserActivity(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could call _updateUserActivity()
, the issue with triggerUserActivity
is that it will resume recording and create a new session.
cc @mydea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, maybe this... IMHO the "best" solution would be to find the cases where we do not want to capture this (e.g. when tab is involved, ...?) and handle them, but this may be tricky. So probably OK to remove this for now and revisit this later...!
This is causing some low-value replays. If you search sentry for replays with duration < 5 seconds, you will see that most of them are re-newed sessions from idle that only have a "keydown" breadcrumb. I suspect users are alt-tabbing out of an idle Sentry page. Removing for now until we have a better way to detect when a session is truly resumed via keydown event.