Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
chore(size-limit): Add size checks for metrics and logs#18573
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Conversation
github-actionsbot commentedDec 19, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
size-limit report 📦
|
| { | ||
| name:'@sentry/browser (incl. Metrics)', | ||
| path:'packages/browser/build/npm/esm/prod/index.js', | ||
| import:createImport('init','metrics'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
tbh, I was surprised that the import ofmetrics andlogs is enough in this case because I was under the impression that just importing this object would still tree-shake the implementation of the individual log/metric operations.
However, I inspected the bundle created by size-limit and it turns out that they're still included.
Also further verified this with creating a custom entry file and writinglogger.info, etc statements and in either case, the resulting bundle was smaller than just specifying thelogger/metric import. So I think we should take this as the upper bound.
Uh oh!
There was an error while loading.Please reload this page.
This PR adds 3 size-limit entries for logs, metrics and both combined. I have some optimizations lined up for reducing bundle size in both but I need a baseline to see if they actually do any good.
ref#18571
ref#18164