Skip to content

Replays ending prematurely #8672

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

Closed
billyvg opened this issue Jul 28, 2023 · 7 comments
Closed

Replays ending prematurely #8672

billyvg opened this issue Jul 28, 2023 · 7 comments
Labels
Package: replay Issues related to the Sentry Replay SDK

Comments

@billyvg
Copy link
Member

billyvg commented Jul 28, 2023

We're noticing some replays are potentially ending prematurely. Here is one such case: replay and error that happens a few seconds after the replay has ended.

The replay ends approximately 2 seconds before the errors occurs. It's possible that either:

  1. something caused the replay to stop recording
  2. user stopped interacting with the page, so there is nothing to flush after the error occurs
  3. something else

In handleAfterSendEvent we may want to add a check to see if replay status is current enabled before tagging with a replay id. We also may want to add a placeholder rrweb event so that we have something to flush to continue the replay. This would address case #2, though it seems odd that this case would happen and I suspect there's something else going.

@billyvg
Copy link
Member Author

billyvg commented Jul 28, 2023

It would be nice to add a replay breadcrumb when we stop a replay so that we have some insight into why and when replays are ending. This wouldn't really work when we stop a replay due to network issues.

@billyvg billyvg added the Package: replay Issues related to the Sentry Replay SDK label Jul 28, 2023
@mydea
Copy link
Member

mydea commented Jul 31, 2023

Yeah, we def. can/should check replay status before adding the ID.

What about adding a proper console log when replay is stopped? Or maybe just for the tracing internal one. Then we'd see this at least in the breadcrumbs of the error, I guess, right?

Do we have an example since we updated to 7.60.1? There we added some logging, e.g. for the conversion buffer->session, that may help a bit as well?

@billyvg
Copy link
Member Author

billyvg commented Aug 1, 2023

@Fwang36
Copy link
Member

Fwang36 commented Aug 1, 2023

Linking an another example provided by a customer. Trace view in the replay shows a total of 14 linked transactions. When viewing the Trace Id of the linked transactions, I see there are actually over 1300 events. Trace Id also shows 4 issues related, but on the replay there are only 2 linked issues.

Link to replay is in an Internal Comment at the bottom of this Zendesk Ticket

@mydea
Copy link
Member

mydea commented Aug 10, 2023

@billyvg do we know if this is still a problem?

@billyvg
Copy link
Member Author

billyvg commented Aug 10, 2023

@mydea I assume so, it's not something I've been able to reproduce, but have seen evidence of it

@mydea
Copy link
Member

mydea commented Sep 28, 2023

We've done a bunch of changes making sure to avoid setting the replay ID when the replay is over, most recently in the latest release 7.72.0 (see: #9109). So I'm gonna close this for now, feel free to reopen (or open a new issue) if this keeps happening!

@mydea mydea closed this as completed Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK
Projects
None yet
Development

No branches or pull requests

3 participants