Skip to content

ref(utils): Simplify collection of xhr request payload #4402

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 18, 2022

Conversation

lobsterkatie
Copy link
Member

@lobsterkatie lobsterkatie commented Jan 13, 2022

This simplifies the implementation of XHR request body harvesting for breadcrumbs, introduced in #2904. Instead of caching the data and grabbing it at a later point, this grabs it as soon as it's available, in the xhr send method.

Fixes #4082.

@github-actions
Copy link
Contributor

size-limit report

Path Base Size (8d64509) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 19.63 KB 19.58 KB -0.3% 🔽
@sentry/browser - CDN Bundle (minified) 62.5 KB 62.44 KB -0.11% 🔽
@sentry/browser - Webpack 22.16 KB 22.09 KB -0.31% 🔽
@sentry/browser - Webpack - gzip = false 75.66 KB 75.59 KB -0.1% 🔽
@sentry/react - Webpack 22.2 KB 22.13 KB -0.31% 🔽
@sentry/nextjs Client - Webpack 46.41 KB 46.34 KB -0.15% 🔽
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.35 KB 28.29 KB -0.22% 🔽

Copy link
Member

@AbhiPrasad AbhiPrasad left a comment

Choose a reason for hiding this comment

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

almost below 22 kb!

@AbhiPrasad
Copy link
Member

I would also make this ref(utils)

@lobsterkatie lobsterkatie changed the title ref(context): Simplify collection of xhr request payload ref(utils): Simplify collection of xhr request payload Jan 18, 2022
@lobsterkatie lobsterkatie merged commit cf6d23a into master Jan 18, 2022
@lobsterkatie lobsterkatie deleted the kmclb-simplify-xhr-body-collection branch January 18, 2022 19:10
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.

Bug in instrumentXHR(): should only splice the current xhr object
2 participants