Summary
@hyperdx/browser exposes recordCanvas and sampling, but it does not appear to expose rrweb replay hooks such as hooks.canvasMutation.
That makes recordCanvas hard to use with drawing-heavy apps, because canvas tools like Excalidraw, Konva, whiteboards, signature pads, and graphing tools can generate a very large number of CanvasMutation events while the user is drawing.
Problem
When recordCanvas: true is enabled, a single drawing interaction can emit a very large stream of replay events.
For many apps, the desired behavior is not to record every stroke or frame, but instead to:
- capture the final canvas state
- debounce canvas updates until the user stops drawing
- allow filtering or coalescing of
CanvasMutation events
Right now, this does not seem possible from @hyperdx/browser alone.
Why this matters
Without recordCanvas, canvas-based UIs replay as blank or incomplete.
With recordCanvas, event volume can become too high to use comfortably.
sampling does not solve this well because the noisy part is specifically canvas mutation traffic, not the standard mousemove, scroll, or input sampling categories.
Requested behavior
Please expose rrweb recorder hooks, or a recorder options passthrough from @hyperdx/browser, so consumers can do things like:
- debounce
hooks.canvasMutation
- suppress intermediate canvas events
- resume publishing only after a quiet period
- implement custom filtering or coalescing for canvas-heavy apps
Example of desired API
For example, an API shaped roughly like this would unblock the use case:
HyperDX.init({
apiKey: "...",
service: "...",
recordCanvas: true,
replay: {
hooks: {
canvasMutation() {
// consumer-defined debounce / coalescing logic
},
},
},
});
Or a direct passthrough of the lower-level recorder config, if that is more appropriate.
Current workaround
The current workaround is to:
- Initialize
@hyperdx/browser with disableReplay: true
- Initialize
@hyperdx/otel-web-session-recorder manually
- Use raw rrweb hooks there
That works, but it defeats the convenience of @hyperdx/browser as the high-level browser SDK.
Reproduction
A minimal repro is any app with a canvas drawing tool enabled and:
HyperDX.init({
apiKey: "...",
service: "...",
recordCanvas: true,
});
Then draw continuously for a few seconds and inspect replay event volume.
Summary
@hyperdx/browserexposesrecordCanvasandsampling, but it does not appear to expose rrweb replay hooks such ashooks.canvasMutation.That makes
recordCanvashard to use with drawing-heavy apps, because canvas tools like Excalidraw, Konva, whiteboards, signature pads, and graphing tools can generate a very large number ofCanvasMutationevents while the user is drawing.Problem
When
recordCanvas: trueis enabled, a single drawing interaction can emit a very large stream of replay events.For many apps, the desired behavior is not to record every stroke or frame, but instead to:
CanvasMutationeventsRight now, this does not seem possible from
@hyperdx/browseralone.Why this matters
Without
recordCanvas, canvas-based UIs replay as blank or incomplete.With
recordCanvas, event volume can become too high to use comfortably.samplingdoes not solve this well because the noisy part is specifically canvas mutation traffic, not the standard mousemove, scroll, or input sampling categories.Requested behavior
Please expose rrweb recorder hooks, or a recorder options passthrough from
@hyperdx/browser, so consumers can do things like:hooks.canvasMutationExample of desired API
For example, an API shaped roughly like this would unblock the use case:
Or a direct passthrough of the lower-level recorder config, if that is more appropriate.
Current workaround
The current workaround is to:
@hyperdx/browserwithdisableReplay: true@hyperdx/otel-web-session-recordermanuallyThat works, but it defeats the convenience of
@hyperdx/browseras the high-level browser SDK.Reproduction
A minimal repro is any app with a canvas drawing tool enabled and:
Then draw continuously for a few seconds and inspect replay event volume.