Skip to content
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

feat(tracing): Upgrade to web-vitals 2.1.0 #3781

Merged
merged 6 commits into from
Jul 16, 2021
Merged

Conversation

AbhiPrasad
Copy link
Member

@AbhiPrasad AbhiPrasad commented Jul 7, 2021

Supercedes #3775

This PR bumps our vendored web-vitals to version 2.1.0. As this bump updated the definition of CLS, we now track the old CLS definition (cls measurement) and the new CLS definition (updated-cls measurement) in the transaction.

We will then cut a beta off this branch and test on Sentry for a couple days. If there isn't a huge discrepancy, we will remove the old CLS definition and move the cls measurement to rely on the updated CLS definition.

Aside from vendoring web-vitals, we also introduced a changelog and noted down the differences between the web-vitals npm package and our vendored version.

TODO:

  • Port over web-vitals tests
  • Add back old CLS value
  • Figure out how to add metadata to alert shift from old CLS -> new CLS definition
  • Figure out what changes we can make to vendored in files (since we do leverage BFCache logic)

@github-actions
Copy link
Contributor

github-actions bot commented Jul 7, 2021

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 21.46 KB (0%)
@sentry/browser - Webpack 22.47 KB (0%)
@sentry/react - Webpack 22.5 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 28.96 KB (+0.05% 🔺)

@AbhiPrasad AbhiPrasad force-pushed the abhi-web-vitals-revamp branch 2 times, most recently from 240a991 to f131162 Compare July 13, 2021 19:04
@AbhiPrasad AbhiPrasad marked this pull request as ready for review July 14, 2021 18:55
@AbhiPrasad AbhiPrasad requested review from dashed and k-fish July 14, 2021 18:56
packages/tracing/src/browser/metrics.ts Outdated Show resolved Hide resolved
packages/tracing/src/browser/web-vitals/README.md Outdated Show resolved Hide resolved
packages/tracing/src/browser/web-vitals/getLCP.ts Outdated Show resolved Hide resolved
packages/tracing/src/browser/web-vitals/getLCP.ts Outdated Show resolved Hide resolved
packages/tracing/src/browser/web-vitals/lib/initMetric.ts Outdated Show resolved Hide resolved
@kamilogorek kamilogorek merged commit 41cf211 into master Jul 16, 2021
@kamilogorek kamilogorek deleted the abhi-web-vitals-revamp branch July 16, 2021 10:06
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.

None yet

4 participants