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(utils): Improved envelope parser #6580

Merged
merged 3 commits into from Dec 20, 2022

Conversation

timfish
Copy link
Collaborator

@timfish timfish commented Dec 19, 2022

An envelope parser has existed in packages/utils/test/testutils.ts for a while. It looks like this was originally copied from the Electron e2e test server. I wrote that code and it's pretty awful and was only ever intended to be used for testing.

To offer the best support for Replay (getsentry/sentry-electron#606), its looking like the Electron main process will need to parse, modify and relay envelopes from the renderer processes. Sending events from renderer to main via a transport rather than an integration also fixes issues with integration ordering and confusing messages logged about events being dropped due to event processors returns null.

The new parseEnvelope has moved to @sentry/utils where it can be used by downstream SDKs.

parseEnvelope is tested as before by round-tripping with serializeEnvelope.

@timfish timfish changed the title feat(utils): Much better envelope parser feat(utils): Improved envelope parser Dec 19, 2022
@timfish timfish self-assigned this Dec 20, 2022
@lforst lforst self-requested a review December 20, 2022 11:46
@lforst lforst merged commit 604cbf1 into getsentry:master Dec 20, 2022
@timfish timfish deleted the feat/better-envelope-parser branch January 5, 2023 16:48
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.

None yet

2 participants