-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
ref(replay): Move earliest timestamp tracking to eventBuffer #7983
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
Conversation
const _context = { | ||
initialTimestamp: this._context.initialTimestamp, | ||
initialUrl: this._context.initialUrl, | ||
errorIds: Array.from(this._context.errorIds).filter(Boolean), |
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.
Noticed these here, we actually check if the ids are non-empty before adding them to the set, so IMHO we do not need these checks anymore.
size-limit report 📦
|
In preparation to allow us to handle this better for buffering sessions.
7774612
to
af01fbe
Compare
const timestamp = timestampToMs(event.timestamp); | ||
if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) { | ||
this._earliestTimestamp = timestamp; | ||
} | ||
|
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.
Why not do the same thing in array buffer?
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.
My thought was that we write this much more often than we read it (we really only read it on the first checkout), so felt it would be more efficient to do work only at read time then?
In preparation to allow us to handle this better for buffering sessions. IMHO the event buffer should "know" about this, and we load it on-demand from there.
Extracted this out from #7025