Title: Re-examine usage of sentry-cli and bundler plugins · Issue #5461 · getsentry/sentry-javascript · GitHub
Open Graph Title: Re-examine usage of sentry-cli and bundler plugins · Issue #5461 · getsentry/sentry-javascript
X Title: Re-examine usage of sentry-cli and bundler plugins · Issue #5461 · getsentry/sentry-javascript
Description: Problem Statement #4894 (comment) brings up sentry-cli size issues. Essentially, due to sentry-cli's binary size, we require users to have some kind of bundling setup to make sure that they tree shake away sentry-cli in application code....
Open Graph Description: Problem Statement #4894 (comment) brings up sentry-cli size issues. Essentially, due to sentry-cli's binary size, we require users to have some kind of bundling setup to make sure that they tree sh...
X Description: Problem Statement #4894 (comment) brings up sentry-cli size issues. Essentially, due to sentry-cli's binary size, we require users to have some kind of bundling setup to make sure that they tre...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/5461
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Re-examine usage of sentry-cli and bundler plugins","articleBody":"### Problem Statement\r\n\r\nhttps://github.com/getsentry/sentry-javascript/issues/4894#issuecomment-1193216873 brings up `sentry-cli` size issues.\r\n\r\nEssentially, due to `sentry-cli`'s binary size, we require users to have some kind of bundling setup to make sure that they tree shake away `sentry-cli` in application code.\r\n\r\nIs there a way we can improve this situation?\r\n\r\nThere's also the concern here with bundlers. Right now we only have a single 1st party plugin, for webpack: https://github.com/getsentry/sentry-webpack-plugin\r\n\r\nThere is also a community vite plugin:\r\n- https://github.com/ikenfin/vite-plugin-sentry\r\n\r\nThe more bundlers we support, the better the out of the box experience is (less finagling with `sentry-cli`).\r\n\r\n### Solution Brainstorm\r\n\r\n#### Sentry-cli usage\r\n\r\nMy musings from slack for the sentry-cli size problem:\r\n\r\n1) Produce a minimized version of `sentry-cli` that pretty much only exposes the API around sourcemaps/releases\r\n2) Expand the amount of bundler plugins we have, (go from just webpack -> rollup, webpack, vite, esbuild, we know how to do this)\r\n3) Make sure the framework SDKs include a bundler plugin, and those bundler plugins only use the minimal sentry-cli.\r\nAnother option here is that we can try making adding build time plugins/steps a Step 2 in the onboarding wizard (after `yarn add` and `Sentry.init`). Mobile has something similar where you need to explicitly add the gradle plugin for Android for ex.\r\n\r\nNote: We'll need to DACI how exactly we make sentry-cli smaller, basically choose between re-writing the needed functionality in JS vs. stripping the CLI rust binary at compile time.\r\n\r\n#### Bundlers\r\n\r\nThere is https://github.com/unjs/unplugin, which allows us to have a single codebase for bundlers (perhaps in the SDK monorepo 👀). It also uses the rollup plugin API, which @lobsterkatie does have a lot of experience with.\r\n\r\n@asonnleitner did some awesome work with https://github.com/asonnleitner/unplugin-sentry as per https://github.com/getsentry/sentry-javascript/discussions/4989. We can def use that as a starting point!","author":{"url":"https://github.com/AbhiPrasad","@type":"Person","name":"AbhiPrasad"},"datePublished":"2022-07-25T18:56:54Z","url":"https://github.com/getsentry/sentry-javascript/issues/5461"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3568f7eb-1615-d5a9-8002-27dee4906931 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D228:279F3F:459B1C:600515:6B049F04 |
| html-safe-nonce | e0a318bec760a0847eada33ed7cf4552ea20fb575eae66c53a2f9fcc8ffd171d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMjI4OjI3OUYzRjo0NTlCMUM6NjAwNTE1OjZCMDQ5RjA0IiwidmlzaXRvcl9pZCI6IjIyNzMxMDAyNjc2OTg1NjA3NzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 3eb9006cbd5a6ef68749f08a3fe9ef09564688a3dd5e6edd7cebf55d089a627d |
| hovercard-subject-tag | issue:1317236183 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/getsentry/sentry-javascript/5461/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c1082c0c8a755dbbb84af39bbd559d805e0c1e81804bd4bbf38b1f9e3f99b547/getsentry/sentry-javascript/issues/5461 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c1082c0c8a755dbbb84af39bbd559d805e0c1e81804bd4bbf38b1f9e3f99b547/getsentry/sentry-javascript/issues/5461 |
| og:image:alt | Problem Statement #4894 (comment) brings up sentry-cli size issues. Essentially, due to sentry-cli's binary size, we require users to have some kind of bundling setup to make sure that they tree sh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AbhiPrasad |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9784b6f42e2d5eac4e394fa88cad134c0dc5b6662b4ff2787a1ed1ef5a96331d |
| turbo-cache-control | no-preview |
| go-import | github.com/getsentry/sentry-javascript git https://github.com/getsentry/sentry-javascript.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3328572 |
| octolytics-dimension-repository_nwo | getsentry/sentry-javascript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3328572 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-javascript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3fd14143b75b2af7b76bbd23b069867d091adfcc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width