Skip to content

Add compression mode to replay event #7140

@mydea

Description

@mydea

It would be good to know how compression works etc. for replay events. There are a few cases:

  • Compression is turned off via useCompression: false
  • Compression is enabled and used
  • Compression is enabled but we fall back to uncompressed mode due to e.g. worker loading issues

I propose to add a field compressionMode to the replay event payload:

type CompressionMode = 'disabled' | 'compressed' | 'fallback';

type ReplayEvent {
 // ... existing fields
  compressionMode: CompressionMode
}

This way, we can later run analysis how frequently compression fails, which can inform decisions about the compression strategy etc.

We can also eventually use this information to give users tips for improving their replay setup - if we detect a project has only events with fallback compression mode, we can prompt the user to either fix their CSP settings or disable compression, as an example.

Metadata

Metadata

Assignees

Labels

Package: replayIssues related to the Sentry Replay SDK
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions