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

recording: send meta event again if session rotates #183

Merged
merged 5 commits into from
Sep 6, 2024

Conversation

marandaneto
Copy link
Member

@marandaneto marandaneto commented Sep 6, 2024

💡 Motivation and Context

The problem: If meta event is missing, the replay will be just a black screen because rrweb hides everything if no meta event is provided

We cache the window and the status object in a weak reference.
If the session rotates, and the window and status object are still in memory, we won't be sending the meta event again
Every time the session rotates, we clear the weak reference object so meta events will be sent again

💚 How did you test it?

Running

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

@marandaneto marandaneto requested a review from a team September 6, 2024 07:35
@marandaneto marandaneto marked this pull request as ready for review September 6, 2024 07:37
Copy link
Member

@pauldambra pauldambra left a comment

Choose a reason for hiding this comment

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

nice 🚀

@marandaneto marandaneto merged commit 5eb2ff8 into main Sep 6, 2024
6 checks passed
@marandaneto marandaneto deleted the fix/rotate-session-meta branch September 6, 2024 08:19
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.

2 participants