Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support browser Replay in renderers #618

Merged
merged 2 commits into from
Jan 11, 2023

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Jan 11, 2023

Closes #606

This PR:

  • Updates the JavaScript SDKs to 7.30.0 for the PRs/changes listed in the above linked issue
  • Adds normalizeUrlsInReplayEnvelope and calls it with envelopes that are passed through the main process
  • Adds a test that checks Replay running in the renderer results in a Replay event
    • The test server and test event normalisation required a few changes

This PR initially failed for lint errors in unchanged files. I ended up needing to:

  • Update eslint version to match the JavaScript monorepo
  • Fixed or ignored the new errors

@timfish timfish marked this pull request as ready for review January 11, 2023 01:20
chunks.push(buf.slice(0, i + 1).toString());
buf = buf.slice(i + 1);
chunks.push(buf.subarray(0, i + 1).toString());
buf = buf.subarray(i + 1);
Copy link
Member

Choose a reason for hiding this comment

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

I assume we made this change for performance reasons?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was to fix a lint warning as slice is now deprecated.

It also happens to be better for perf. as there's no new allocation!

Copy link
Member

Choose a reason for hiding this comment

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

This was to fix a lint warning as slice is now deprecated.

TIL!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TIL that Buffer.prototype.slice() is not compatible with the Uint8Array.prototype.slice(), which is a superclass of Buffer.

@timfish timfish merged commit 207b211 into getsentry:master Jan 11, 2023
@timfish timfish deleted the feat/replay branch January 11, 2023 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Session Replay
2 participants