-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[Feature Request]: Is there a way to merge events within a specified period of time? #1560
Comments
@wqcstrong I have the idea to solve it, but In what scenarios would this be used? |
@wqcstrong You can try it with:
npm install rrweb-events-merge
import { mergeEvents } from "rrweb-events-merge";
const mergedEvents = mergeEvents({
events: events,
startTimeStamp: startTimeStamp,
endTimeStamp: endTimeStamp,
iframe: iframe,
snapshotOptions: {
mirror,
},
onError: (error: string) => {
console.error(error);
},
}); Here is the repo: https://github.com/wfk007/rrweb-events-merge |
@wfk007 Thx, I will take a look ❤️
This repository https://github.com/HuolalaTech/page-spy-web/ provides the ability to replay runtime information on browser applications through log files. It now also supports log trimming, but now is achieved by manipulating time information, meaning the file size of rrweb remains unchanged. If events could be merged, it would be a significant breakthrough. |
@wqcstrong I opened a PR: #1616. Please help to confirm if this PR can solve your problem at your convenience. |
Your implementation converts the complete events into
Then developer open the recording log, which is ready to replay and size is 5Mb. Perhaps I didn't express clearly, leading to your misunderstanding. If that's the case, I'm sorry! |
I think that you can try this approach to deal with the events(10MB) based on client replay before uploading or do it with jsdom in server. |
Preflight Checklist
What package is this feature request for?
rrweb
Problem Description
Proposed Solution
/
Alternatives Considered
/
Additional Information
No response
The text was updated successfully, but these errors were encountered: