-
Notifications
You must be signed in to change notification settings - Fork 142
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
[RUMF-1147] 🐛 Implement TextEncoder().encode fallback for replay encorder #1269
[RUMF-1147] 🐛 Implement TextEncoder().encode fallback for replay encorder #1269
Conversation
Talking with @BenoitZugmeyer, I tried two different approaches for the fallback:
IMO, In term of complexity Pako fallback is the best solution. Additional question: |
Codecov Report
@@ Coverage Diff @@
## main #1269 +/- ##
==========================================
- Coverage 89.93% 89.90% -0.03%
==========================================
Files 105 105
Lines 4370 4370
Branches 989 989
==========================================
- Hits 3930 3929 -1
- Misses 440 441 +1
Continue to review full report at Codecov.
|
Motivation
RUM session replay on Edge 18 when encoding records to UTF-8 an error is thrown.
This PR implement a fallback if TextEncoder().encode is not supported.
Changes
string2buf
encoding function: https://github.com/nodeca/pako/blob/master/lib/utils/strings.js#L26Testing
I have gone over the contributing documentation.