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

fix(replay): Fix user activity not being updated in start() #12001

Merged
merged 2 commits into from
May 13, 2024

Conversation

billyvg
Copy link
Member

@billyvg billyvg commented May 13, 2024

Replays will fail to start recording when using start() specifically when manually recording and after the user has been idle for a long period of time. We need to reset the user activity state when we call start(), otherwise the session will be [incorrectly] considered to be idle and unable to send any replay events.

Closes #11983

@billyvg
Copy link
Member Author

billyvg commented May 13, 2024

Note we do have tests for this situation for on error.

// constructor, so if `start()` is called after
// session idle expiration, a replay will not be
// created due to an idle timeout.
this._updateUserActivity();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯 ahhh I see, that makes sense of course!

@billyvg billyvg marked this pull request as ready for review May 13, 2024 14:26
@billyvg billyvg requested a review from a team as a code owner May 13, 2024 14:26
@mydea mydea merged commit 945c19e into develop May 13, 2024
67 checks passed
@mydea mydea deleted the fix-replay-start-reset-user-activity branch May 13, 2024 14:28
andreiborza pushed a commit that referenced this pull request May 16, 2024
Replays will fail to start recording when using `start()` specifically
when manually recording and after the user has been idle for a long
period of time. We need to reset the user activity state when we call
`start()`, otherwise the session will be [incorrectly] considered to be
idle and unable to send any replay events.

Closes #11983
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.

Replay fails to start recording when using start()
2 participants