feat: Add rrweb replay config#255
Conversation
🦋 Changeset detectedLatest commit: effa6d2 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
253a297 to
4fd0551
Compare
|
Closes #253 |
Greptile SummaryThis PR adds rrweb replay configuration to the browser SDK. The main changes are:
Confidence Score: 4/5The public replay type should stop accepting the recorder-owned
packages/browser/src/index.ts Important Files Changed
Reviews (1): Last reviewed commit: "Merge branch 'main' into drew/rrweb-repl..." | Re-trigger Greptile |
| type Instrumentations = RumOtelWebConfig['instrumentations']; | ||
| type IgnoreUrls = RumOtelWebConfig['ignoreUrls']; | ||
|
|
||
| type ReplayConfig = Omit<RumRecorderConfig, 'apiKey' | 'url' | 'debug'>; |
There was a problem hiding this comment.
Recorder Emit Callback Is Ignored
ReplayConfig accepts rrweb's emit option, but SessionRecorder.init replaces it with the SDK's exporter callback after spreading the replay options. A caller can therefore provide replay.emit successfully while the callback is silently never invoked.
| type ReplayConfig = Omit<RumRecorderConfig, 'apiKey' | 'url' | 'debug'>; | |
| type ReplayConfig = Omit< | |
| RumRecorderConfig, | |
| 'apiKey' | 'url' | 'debug' | 'emit' | |
| >; |
Context Used: AGENTS.md (source)
This PR adds a
replayitem to the HyperDX config which is passed through to rrweb, allowing for users to pass custom callbacks for DOM mutation events:Screen.Recording.2026-05-15.at.2.09.18.PM.mov
Note:
canvasMutationis available, but it appears rrweb 1.1.3 does not actually call the canvasMutation callback on all canvas events. A larger upgrade to rrweb v2 may be necessary to improve canvas support.