Skip to content

ref: Remove unneeded logic from transports #5002

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 3 commits into from
Apr 28, 2022

Conversation

lforst
Copy link
Contributor

@lforst lforst commented Apr 27, 2022

Previously we assumed it was necessary to return information from transport.send() to collect outcomes for client transports. The plan is to instead inject a hook/callback through the client, into the transports, that is responsible for collecting client reports within the transport itself. This makes the interface for the transports much less strict for anybody wanting to create their own transports, and it also allows us to delete a bunch of code that was used for managing the return values of transport.send(). Bundle size go ⬇️ Usability go ⬆️

This PR removes the unneeded return values from transports and anything that is now unused.

Upcoming PRs for client transports will build on these changes so keep an eye out for that. :)

Ref: https://getsentry.atlassian.net/browse/WEB-775

@github-actions
Copy link
Contributor

github-actions bot commented Apr 27, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.11 KB (-10.06% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 56.96 KB (-11.85% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 16.89 KB (-10.43% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 51.2 KB (-11.69% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20.71 KB (-10.88% 🔽)
@sentry/browser - Webpack (minified) 71.93 KB (-11.97% 🔽)
@sentry/react - Webpack (gzipped + minified) 20.74 KB (-10.89% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 45.73 KB (-4.84% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 23.89 KB (-8.4% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.41 KB (-8.47% 🔽)

@lforst lforst requested review from AbhiPrasad and Lms24 April 27, 2022 21:10
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.

❤️

@lforst lforst marked this pull request as ready for review April 28, 2022 06:18
@lforst lforst merged commit 69028bf into 7.x Apr 28, 2022
@lforst lforst deleted the lforst-remove-unneeded-structures branch April 28, 2022 06:52
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 12, 2022
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.

2 participants