Skip to content

feat(replay): Use new prepareEvent util & ensure dropping replays works #6522

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

Merged
merged 1 commit into from
Jan 4, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 14, 2022

NOTE: Depends on #6517

This uses the newly exposed prepareEvent util from core, and also makes sure that the event processors actually work as expected.

General changes:

  • Ensure that replays can be dropped when an event processor returns null (previously, this would error)
  • Removes some unneeded test stuff

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.79 KB (-0.03% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 61.29 KB (-0.08% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.58 KB (-0.04% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 54.88 KB (-0.08% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20.34 KB (0%)
@sentry/browser - Webpack (minified) 66.46 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.36 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.62 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.75 KB (-0.03% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.2 KB (-0.03% 🔽)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.47 KB (+3.25% 🔺)
@sentry/replay - Webpack (gzipped + minified) 38.24 KB (+0.14% 🔺)

@mydea mydea force-pushed the fn/prepareEvent-use-replay branch from 29a7213 to 9521386 Compare December 14, 2022 17:02
@mydea mydea changed the base branch from master to fn/prepareEvent December 14, 2022 17:02
Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from fn/prepareEvent to master January 3, 2023 10:45
@mydea mydea force-pushed the fn/prepareEvent-use-replay branch from 9521386 to 8aaff54 Compare January 3, 2023 10:50
@mydea mydea marked this pull request as ready for review January 3, 2023 10:50
Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

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

Nice work! I'm a little concerned about the bundle size increase though... my guess is that we now bundle prepareEvent into the Replay CDN bundle which causes this increase. I guess we'll just have to take that hit but this def adds to the benefits of a complete bundle (#6573).

@@ -108,7 +108,6 @@ export function makeTerserPlugin() {
'_initStorage',
'_support',
// TODO: Get rid of these once we use the SDK to send replay events
'_prepareEvent', // replay uses client._prepareEvent
'_metadata', // replay uses client.getOptions()._metadata
Copy link
Member

Choose a reason for hiding this comment

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

Side-note: As discussed, I'll take a look if we can get rid of the _metadata entry here

@mydea mydea force-pushed the fn/prepareEvent-use-replay branch from 8aaff54 to 7fecdfb Compare January 3, 2023 13:42
@mydea mydea force-pushed the fn/prepareEvent-use-replay branch from 7fecdfb to c2ba7be Compare January 3, 2023 15:03
@mydea mydea merged commit b674c26 into master Jan 4, 2023
@mydea mydea deleted the fn/prepareEvent-use-replay branch January 4, 2023 09:03
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.

3 participants