Title: [v9] Respect user-provided sourcemap generation settings · Issue #13993 · getsentry/sentry-javascript · GitHub
Open Graph Title: [v9] Respect user-provided sourcemap generation settings · Issue #13993 · getsentry/sentry-javascript
X Title: [v9] Respect user-provided sourcemap generation settings · Issue #13993 · getsentry/sentry-javascript
Description: Edit by @lforst: Depends on #14286 Reference getsentry/sentry-javascript-bundler-plugins#256 Description Currently, most (all?) of our meta framework SDKs enable source map generation even if users explicitly disabled sourcemap generatio...
Open Graph Description: Edit by @lforst: Depends on #14286 Reference getsentry/sentry-javascript-bundler-plugins#256 Description Currently, most (all?) of our meta framework SDKs enable source map generation even if users...
X Description: Edit by @lforst: Depends on #14286 Reference getsentry/sentry-javascript-bundler-plugins#256 Description Currently, most (all?) of our meta framework SDKs enable source map generation even if users...
Opengraph URL: https://github.com/getsentry/sentry-javascript/issues/13993
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[v9] Respect user-provided sourcemap generation settings","articleBody":"*Edit by @lforst: Depends on https://github.com/getsentry/sentry-javascript/issues/14286*\nReference https://github.com/getsentry/sentry-javascript-bundler-plugins/issues/256\n\n### Description\n\nCurrently, most (all?) of our meta framework SDKs enable source map generation even if users explicitly disabled sourcemap generation in their build config. While this improves the onboarding experience because Sentry \"just works\", it is intrusive and overrides a quite critical user decision. In most frameworks we emit build logs that we do this but it's nevertheless questionable behaviour. \n\nTherefore, we decided to change the behaviour with the next upcoming major for all stable meta framework SDKs:\n\n- If users explicitly disabled sourcemaps (e.g. `build.sourcemaps: false` in Vite), we respect this and emit a warning that errors won't be unminified in Sentry. We will not upload anything.\n- If users set source map generation to any other value that effectively enables them (`true`, `hidden`, `inline`, etc). We respect this and don't do anything (i.e. deletion) besides uploading. Uploading will still emit build logs as today.\n- If users don't explicitly enable/disable set source maps generation, we \n - enable **hidden** source maps generation\n - configure `filesToDeleteAfterUpload` to delete all `.map` files\n - emit a log that this is what we're doing for transparency\n\nFor stable SDKs, this change is behaviour-breaking with significant user impact. So we will only do this in the upcoming major.\n\n```[tasklist]\n### Stable SDKs\n- [ ] https://github.com/getsentry/sentry-javascript/issues/14905\n- [ ] https://github.com/getsentry/sentry-javascript/issues/14885\n- [ ] https://github.com/getsentry/sentry-javascript/issues/14993\n- [x] Remix (not applicable): manual setup https://docs.sentry.io/platforms/javascript/guides/remix/sourcemaps/\n```\n\nFor SDKs currently in beta, we can change this right now, which is also a good opportunity to trial the new behaviour\n\n```[tasklist]\n### SDKs in Beta\n- [x] https://github.com/getsentry/sentry-javascript/pull/14020\n- [ ] https://github.com/getsentry/sentry-javascript/issues/13994\n```\n\n### Considered Trade-offs\n\n- If users explicitly disable source maps, errors will no longer appear unminified in Sentry (since we don't upload anything). This is a UX decrease in Sentry but it is compensated by being a good citizen on the SDK side. We will emit clear warnings that this is problematic and ask users to enable and delete or unset their source map generation settings.\n- Theoretically, other bundler plugins could modify the source map generation setting prior to our plugin coming in and checking the previously set value. We cannot detect this. For now we'll live with this trade-off and evaluate how much of a problem this actually is.\n- Some frameworks (like Nuxt) recognize during build if source maps are emitted and might change the build output (for example, list the source maps as routes in a routing manifst/table). If we delete source maps afterwards (case 3), this might cause build or runtime issues/warnings/logs. We'll need to find framework-specific solutions how to address this. For instance, we could try to modify the route manifest file and remove the entries again.","author":{"url":"https://github.com/Lms24","@type":"Person","name":"Lms24"},"datePublished":"2024-10-16T07:49:11Z","url":"https://github.com/getsentry/sentry-javascript/issues/13993"}
| 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:4136db81-53dd-8e46-27e6-67f869cc08ce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C6F0:2041A7:3F446D:56E345:6B046E49 |
| html-safe-nonce | 770d700192dd5db361d91d0a0daa9c5de99d554fcf8788e4d058b4e58a951b18 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNkYwOjIwNDFBNzozRjQ0NkQ6NTZFMzQ1OjZCMDQ2RTQ5IiwidmlzaXRvcl9pZCI6IjQ1Mzc3NzQ0OTA2NjY2OTIxNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f9df5816fd273557a0a46617233990cd1289efe3451015c462d4f53a156f392a |
| hovercard-subject-tag | issue:2590976827 |
| 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/13993/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fe0614fbd0d9a131c9e0447a81660f4c57df75a5088c51bbe281b526ba59db67/getsentry/sentry-javascript/issues/13993 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe0614fbd0d9a131c9e0447a81660f4c57df75a5088c51bbe281b526ba59db67/getsentry/sentry-javascript/issues/13993 |
| og:image:alt | Edit by @lforst: Depends on #14286 Reference getsentry/sentry-javascript-bundler-plugins#256 Description Currently, most (all?) of our meta framework SDKs enable source map generation even if users... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Lms24 |
| hostname | github.com |
| expected-hostname | github.com |
| None | ae8802492f12d3ba4f6b0d814054e617a2a5616b6327bf8555c10cd5b0dc2a6f |
| 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 | cfb5f24c6e01d85f70804652a5107e5cac03a161 |
| 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