Skip to content

Conversation

@AbhiPrasad
Copy link
Member

Simplify new transport send by grabbing the envelope category from the
envelope instead of passing it in explicitly.

Simplify new transport send by grabbing the envelope category from the
envelope instead of passing it in explicitly.
@AbhiPrasad AbhiPrasad requested review from a team, lforst and lobsterkatie and removed request for a team March 22, 2022 13:33
@github-actions
Copy link
Contributor

github-actions bot commented Mar 22, 2022

size-limit report

Path Base Size (a929462) Current Size Change
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.49 KB 19.49 KB -0.02% 🔽
@sentry/browser - ES5 CDN Bundle (minified) 62.17 KB 62.17 KB 0%
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.12 KB 18.11 KB -0.02% 🔽
@sentry/browser - ES6 CDN Bundle (minified) 55.5 KB 55.5 KB 0%
@sentry/browser - Webpack (gzipped + minified) 22.6 KB 22.6 KB 0%
@sentry/browser - Webpack (minified) 79.21 KB 79.21 KB 0%
@sentry/react - Webpack (gzipped + minified) 22.63 KB 22.63 KB 0%
@sentry/nextjs Client - Webpack (gzipped + minified) 47.6 KB 47.6 KB 0%
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 25.36 KB 25.36 KB -0.01% 🔽
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23.72 KB 23.72 KB -0.01% 🔽


function send(envelope: Envelope, category: TransportCategory): PromiseLike<TransportResponse> {
function send(envelope: Envelope): PromiseLike<TransportResponse> {
const category = getEnvelopeType(envelope) as TransportCategory;
Copy link
Contributor

@lforst lforst Mar 22, 2022

Choose a reason for hiding this comment

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

Naive question because I'm not too familiar with envelopes yet: Would it make sense to change the return type of getEnvelopeType to be more strict instead of casting here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to make this more clear!

@AbhiPrasad AbhiPrasad enabled auto-merge (squash) March 23, 2022 12:44
@AbhiPrasad AbhiPrasad merged commit 5f6335d into master Mar 23, 2022
@AbhiPrasad AbhiPrasad deleted the abhi-get-env-type branch March 23, 2022 13:11
@AbhiPrasad AbhiPrasad added this to the Pre 7.0.0 Work milestone Mar 23, 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.

3 participants