Navigation Menu

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

ref(core): Pre-beforeSendTransaction cleanup #6135

Merged
merged 10 commits into from Nov 4, 2022

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Nov 3, 2022

This is a collection of a bunch of small and mostly dumb fixes pulled from #6121 (along with a few others I happened upon in the course of working on it), in order to make that PR easier to review. Some of the changes are cosmetic (formatting and wordsmithing test names, adding comments, etc.), some are refactors for clarity (mostly renaming of variables), one or two are test changes which will be necessary for the tests introduced in #6121 (in order to keep the beforeSend and beforeSendTransaction tests as parallel as possible, in case we ever want to parameterize them), one is pulling unneeded extra data out of a test to make it simpler, and two are actual fixes, namely:

  • In the outcomes test, we were recording a session being dropped by beforeSend, but sessions don't go through beforeSend, so it's now an error event.

  • In many places in the base client tests, we were using .toBe() rather than toEqual() for values (like numbers and strings) which as far as I know aren't guaranteed to be singletons (the way true and false are, for example). This switches to using toEqual() in those cases.

Note: Each commit is a single one of the above changes, in case it's easier to review that way.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.49 KB (-0.04% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.35 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.12 KB (-0.05% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 53.67 KB (-0.02% 🔽)
@sentry/browser - Webpack (gzipped + minified) 19.86 KB (-0.04% 🔽)
@sentry/browser - Webpack (minified) 65.12 KB (+0.05% 🔺)
@sentry/react - Webpack (gzipped + minified) 19.88 KB (-0.05% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.78 KB (-0.02% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.24 KB (-0.03% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 24.62 KB (-0.04% 🔽)

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.

LGTM. Thanks for pulling this out and for the individual commits - makes reviewing easier.

Comment on lines -1100 to -1111
contexts: {
trace: {
op: 'pageload',
span_id: 'a3df84a60c2e4e76',
trace_id: '86f39e84263a4de99c326acab3bfe3bd',
},
},
environment: 'production',
event_id: '972f45b826a248bba98e990878a177e1',
spans: [],
start_timestamp: 1591603196.614865,
timestamp: 1591603196.728485,
Copy link
Member

@Lms24 Lms24 Nov 4, 2022

Choose a reason for hiding this comment

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

So this is just stuff we didn't need for the test?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup. It has nothing to do with the name-change data we're testing, so in the end it's just noise.

@lobsterkatie lobsterkatie merged commit b56a573 into master Nov 4, 2022
@lobsterkatie lobsterkatie deleted the kmclb-pre-beforeSendTransaction-cleanup branch November 4, 2022 08:30
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