Skip to main content
Flashduty RUM’s session replay feature is integrated into the RUM SDK. By simply configuring sampling rates and privacy rules, you can quickly enable the replay feature.

Enable Collection

The replay SDK is integrated into the RUM SDK. Configure the sampling rate to enable the replay feature:
window.FC_RUM.init({
  applicationId: "YOUR_APPLICATION_ID",
  clientToken: "YOUR_CLIENT_TOKEN",
  // ...
  sessionReplaySampleRate: 10, // Default session replay sampling rate 10%
  // ...
});
Sampling Method: When initializing a session in the client SDK, a random number between 0-1 is generated and compared with rate/100. If it falls within the range, the session becomes a sample and replay data is collected and reported throughout the session lifecycle.Based on the session being sampled, the session replay sampling rate (sessionReplaySampleRate) is calculated and sampled a second time.

Disable Collection

If you need to disable the collection feature, set the corresponding replay sampling rate to 0 or simply remove the configuration item:
window.FC_RUM.init({
  applicationId: "YOUR_APPLICATION_ID",
  clientToken: "YOUR_CLIENT_TOKEN",
  // ...
  sessionReplaySampleRate: 0, // Disable replay feature
  // ...
});

How It Works

The session replay SDK is based on rrweb.
1

Recording Phase

The recording SDK takes snapshots of the current DOM and CSS styles, and collects corresponding events when user behaviors occur (DOM changes, mouse movement, clicks, form input, etc.). Data is reported after serialization, compression, and sensitive information removal.
2

Replay Phase

The playback SDK reconstructs the DOM based on snapshots and converts event behaviors into DOM changes for display at appropriate times.
  • Before data reporting, the SDK compresses data in advance and executes this CPU-intensive operation in a Web Worker, without affecting main thread rendering
  • SDK compatibility is consistent with RUM SDK, supporting IE11 and above browsers

Next Steps