Compression
I have about 10 hours left before I need to take a big break from the project, so I'll try and make the session replays ready for the deployment so that I can start collecting data. For that I need to:
- add user agent/device info parsing on backend
- done
- add compression
- done
- optimize the rrweb recording
- set up MinIO in prod
- package rrweb with tracking script, and update on all apps
- done
Started the day by implementing user agent parsing on the backend. Found an amazing library (go-useragent) for that. Done. Works fine.
Next up, compression. Looks like rrweb supports compression natively, so that's what I'm going to use. It's not ideal, it's compressing every event separately, but it will have to do for now.
Now that I did it, I hate it. It compresses every event individually, which makes no sense. I'll just do it properly and gzip the whole thing manually.
Tried importing rrweb into the script, but that makes it 60kB gzipped. That's pretty huge, but I'll have to deal with that later.
Pretty much done with this, but there's some kind of problem when reading it back. Too tired to figure it out now, so I'm wrapping up.