Skip to content

ref: Refactor transport, request, and client report types #5007

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

Conversation

lforst
Copy link
Member

@lforst lforst commented Apr 28, 2022

This PR cleans up a few types we intend to use for client reports:

  • Create EventDropReason in favor of Outcome. The term Outcome is a bit overloaded and the docs use it to describe the structure of the objects we should send as client report. We change this to better match the docs.
  • Introduce DataCategory type in favor of TransportCategory and SentryRequestType. Data categories are used in more places than the transports and we should reflect that. This is also to better match the docs.
  • Remove unused SentryRequest type.

Bonus:

  • Tiny cleanup in createSessionEnvelope so we don't need a type-cast :)

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

@lforst lforst requested review from lobsterkatie and Lms24 April 28, 2022 08:01
@github-actions
Copy link
Contributor

github-actions bot commented Apr 28, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 18.12 KB (-10.04% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 56.97 KB (-11.83% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 16.9 KB (-10.4% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 51.21 KB (-11.67% 🔽)
@sentry/browser - Webpack (gzipped + minified) 18.81 KB (-19.07% 🔽)
@sentry/browser - Webpack (minified) 60.99 KB (-25.36% 🔽)
@sentry/react - Webpack (gzipped + minified) 18.83 KB (-19.11% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 42.51 KB (-11.54% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 23.89 KB (-8.38% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 22.42 KB (-8.43% 🔽)

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.

Looking good, I like the types changes

@lforst lforst merged commit aefa9b1 into 7.x Apr 28, 2022
@lforst lforst deleted the lforst-data-category-type-cleanup branch April 28, 2022 10:45
@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.

3 participants