Skip to content

Conversation

@AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented May 17, 2022

This PR reduces metrics bundle size by converting the MetricsInstrumentation class into a set of functions.

The MetricsInstrumentation class constructor was turned into the startTrackingWebVitals function. The internal class state was turned into a set of global variables that get mutated.

Resolves https://getsentry.atlassian.net/browse/WEB-816

@github-actions
Copy link
Contributor

github-actions bot commented May 17, 2022

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 19.42 KB (-3.6% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 60.11 KB (-6.97% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.26 KB (-3.18% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 53.8 KB (-7.2% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20 KB (-13.92% 🔽)
@sentry/browser - Webpack (minified) 63.34 KB (-22.49% 🔽)
@sentry/react - Webpack (gzipped + minified) 20.03 KB (-13.96% 🔽)
@sentry/nextjs Client - Webpack (gzipped + minified) 43.4 KB (-9.69% 🔽)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 24.99 KB (-4.17% 🔽)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 23.59 KB (-3.66% 🔽)

@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-metrics-refactor branch from 09a20c7 to f8435cc Compare May 19, 2022 19:02
@AbhiPrasad AbhiPrasad requested review from a team, lforst and lobsterkatie and removed request for a team May 19, 2022 19:04
@AbhiPrasad AbhiPrasad marked this pull request as ready for review May 19, 2022 19:04
@AbhiPrasad AbhiPrasad force-pushed the v7-abhi-metrics-refactor branch from f8435cc to 8b6ecb0 Compare May 19, 2022 19:22
@lforst lforst merged commit 945437a into 7.x May 23, 2022
@lforst lforst deleted the v7-abhi-metrics-refactor branch May 23, 2022 13:19
@AbhiPrasad AbhiPrasad added this to the 7.0.0 milestone May 30, 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