codecov / codecov-javascript-bundler-plugins

Set of bundler plugins that allow users to upload bundle stats to Codecov.
MIT License
4 stars 1 forks source link

feat: send sentry bundle size metrics #87

Closed DominikB2014 closed 7 months ago

DominikB2014 commented 7 months ago

As part of https://github.com/getsentry/sentry/issues/64090, I'm looking at sending bundle stat metrics from the codecov plugin. And then we can use the codecov plugin inside the sentry webpack plugin in order to send bundle stats after a release.

@nicholas-codecov @AbhiPrasad do you both mind taking a quick look to see if this all makes sense?

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 67.30769% with 17 lines in your changes are missing coverage. Please review.

Project coverage is 82.18%. Comparing base (657d6cb) to head (8efef6a).

Files Patch % Lines
...kages/bundler-plugin-core/src/utils/sentryUtils.ts 73.91% 11 Missing and 1 partial :warning:
...src/bundle-analysis/bundleAnalysisPluginFactory.ts 16.66% 3 Missing and 2 partials :warning:
Additional details and impacted files | [Components](https://app.codecov.io/gh/codecov/codecov-javascript-bundler-plugins/pull/87/components?src=pr&el=components&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | Coverage Δ | | |---|---|---| | [Plugin core](https://app.codecov.io/gh/codecov/codecov-javascript-bundler-plugins/pull/87/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `94.23% <67.30%> (-1.17%)` | :arrow_down: | | [Rollup plugin](https://app.codecov.io/gh/codecov/codecov-javascript-bundler-plugins/pull/87/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `7.24% <ø> (ø)` | | | [Vite plugin](https://app.codecov.io/gh/codecov/codecov-javascript-bundler-plugins/pull/87/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `7.24% <ø> (ø)` | | | [Webpack plugin](https://app.codecov.io/gh/codecov/codecov-javascript-bundler-plugins/pull/87/components?src=pr&el=component&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=codecov) | `32.63% <ø> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-staging[bot] commented 7 months ago

Bundle Report

Changes will decrease total bundle size by 370.38kB :arrow_down:

Bundle name Size Change
@codecov/example-rollup-app-iife 256.9kB 256.9kB :arrow_up:
@codecov/bundler-plugin-core-cjs 149.53kB 149.53kB :arrow_up:
@codecov/bundler-plugin-core-es 3.73kB 3.73kB :arrow_up:
@codecov/vite-plugin-cjs 10.83kB 10.83kB :arrow_up:
@codecov/vite-plugin-es 271 bytes 271 bytes :arrow_up:
@codecov/example-next-app-client 894.27kB 894.27kB :arrow_up:
@codecov/webpack-plugin-cjs 12.73kB 12.73kB :arrow_up:
@codecov/webpack-plugin-es 154 bytes 154 bytes :arrow_up:
example-webpack-app-array-push (removed) 71.19kB :arrow_down:
example-vite-app-es (removed) 150.59kB :arrow_down:
example-next-app-server (removed) 325.59kB :arrow_down:
example-next-app-edge-server (removed) 306 bytes :arrow_down:
example-next-app-client (removed) 894.22kB :arrow_down:
example-rollup-app-iife (removed) 256.9kB :arrow_down:
codecov-staging[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 65.45455% with 19 lines in your changes are missing coverage. Please review.

Files Patch % Lines
...kages/bundler-plugin-core/src/utils/sentryUtils.ts 71.42% 13 Missing and 1 partial :warning:
...src/bundle-analysis/bundleAnalysisPluginFactory.ts 16.66% 3 Missing and 2 partials :warning:
Components Coverage Δ
Plugin core 94.08% <65.45%> (-1.32%) :arrow_down:
Rollup plugin 7.24% <ø> (ø)
Vite plugin 7.24% <ø> (ø)
Webpack plugin 32.63% <ø> (ø)

:loudspeaker: Thoughts on this report? Let us know!

nicholas-codecov commented 7 months ago

Let's hold off on this until #86 gets merged - then we can use the same logic Nick built there to validate the config.

Thanks for the reminder to merge that PR 😅

codecov[bot] commented 7 months ago

Bundle Report

Changes will increase total bundle size by 23.23kB :arrow_up:

Bundle name Size Change
@codecov/bundler-plugin-core-cjs 160.08kB 9.04kB :arrow_up:
@codecov/example-rollup-app-iife 256.9kB 0 bytes
@codecov/example-vite-app-es 150.59kB 0 bytes
@codecov/bundler-plugin-core-es 7.41kB 2.02kB :arrow_up:
@codecov/vite-plugin-cjs 10.83kB 0 bytes
@codecov/webpack-plugin-es 12.32kB 12.17kB :arrow_up:
@codecov/vite-plugin-es 271 bytes 0 bytes
@codecov/rollup-plugin-cjs 10.7kB 0 bytes
@codecov/rollup-plugin-es 152 bytes 0 bytes
@codecov/example-next-app-server 325.59kB 0 bytes
@codecov/example-next-app-edge-server 306 bytes 0 bytes
@codecov/example-webpack-app-array-push 71.19kB 0 bytes
@codecov/webpack-plugin-cjs 12.74kB 0 bytes
@codecov/example-next-app-client 894.27kB 0 bytes