Skip to content

fix(ui): add @rrweb/packer support for event decompression #109

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AJDX3906
Copy link

@AJDX3906 AJDX3906 commented Apr 8, 2025

Event Decompression Support in Session Viewer

This pull request adds support for handling compressed rrweb events in the session viewer component. The changes are focused on the UI layer and introduce client-side decompression capabilities.

Server-side event compression is highly important. While not mandatory, it is strongly recommended due to the significant performance improvements and cost reductions it offers:

  • Reduces network transfer volume
  • Lowers storage costs
  • Improves transfer efficiency

Key Changes

Dependencies:

  • ui/package.json: Added @rrweb/packer dependency to handle event decompression

Session Viewer Enhancement:

  • ui/src/components/sessions/session-viewer/session-viewer.tsx:
    • Added support for decompressing events using @rrweb/packer
    • Enhanced WebSocket message handler to support both compressed and uncompressed events
    • Implemented error handling for decompression failures
    • Maintained backward compatibility with existing uncompressed events

Implementation Details

The session viewer now checks the incoming WebSocket messages and attempts to decompress them if they're not already in object format. This approach:

  • Maintains compatibility with existing uncompressed events
  • Gracefully handles decompression failures
  • Filters out any failed decompression attempts before passing events to the player

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant