-
Notifications
You must be signed in to change notification settings - Fork 131
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: do not start recording buffer without id #1215
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Size Change: +273 B (+0.03%) Total Size: 973 kB
ℹ️ View Unchanged
|
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.
One thing I noticed in the rrweb spec recently is the concept of checkouts: https://github.com/rrweb-io/rrweb/blob/d7cf8dd07547f6fb22ef82e341a88357c4053bd3/guide.md#checkout
Haven't looked into it fully but it seems like they have methods for capturing the last X events or taking a full snapshot every X ms. Just thought I'd flag it in case we're rebuilding things for the buffer that already exist:
- They suggest
checkoutEveryNth
is good for capturing events before an error occurred - Maybe
checkoutEveryNms
could replace some of our custom timer logic
yeah, i tried the checkout every X once and it conflicts with a lot of our custom checkout (or vice versa our custom tracking conflicts with it) might be worth an attempt to strip this back and save on bundle if nothing else 🤔 |
Things used to start undefined, and they do so much less now
As an effect of that, we start session recording with an absent session and window id
This makes a persistent buffer hard to make since we have no reproducible key
We always have a session manager when we start now, so we can always start with an id
This is mostly tricky in tests, because we have a mock rrweb and then fake around the behavior of snapshots on initialisation