Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/rrweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"prepare": "npm run prepack",
"prepack": "npm run bundle",
"test": "npm run bundle:browser && jest",
"test:headless": "npm run bundle:browser && PUPPETEER_HEADLESS=true jest",
"test:watch": "PUPPETEER_HEADLESS=true npm run test -- --watch",
"test:debug": "npm run bundle:browser && PUPPETEER_DEBUG=true jest",
"test:watch": "npm run test -- --watch",
"repl": "npm run bundle:browser && node scripts/repl.js",
"dev": "yarn bundle:browser --watch",
"bundle:browser": "cross-env BROWSER_ONLY=true rollup --config",
Expand Down
3 changes: 2 additions & 1 deletion packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
import { IframeManager } from './iframe-manager';
import { ShadowDomManager } from './shadow-dom-manager';
import { CanvasManager } from './observers/canvas/canvas-manager';
import { callbackWrapper } from '../sentry/callbackWrapper';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be generally upstreamable, so I would try to name this in a way that is not sentry specific.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually disregard this. I can see we need to separately upstream this with the amount of pending upstream changes already.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm actually thinking to upstream this as a more generic configurable errorHandler kind of thing. IMHO that probably makes the most sense from a generic rrweb usage perspective! Then we can configure the error handler to add the __rrweb__ stuff in sentry-javascript for us (long term, when we eventually update our fork to v2)


function wrapEvent(e: event): eventWithTime {
return {
Expand Down Expand Up @@ -343,7 +344,7 @@ function record<T = eventWithTime>(
);

const observe = (doc: Document) => {
return initObservers(
return callbackWrapper(initObservers)(
{
mutationCb: wrappedMutationEmit,
mousemoveCb: (positions, source) =>
Expand Down
Loading