Skip to content

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