-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Example update: with-sentry-simple #8684
Example update: with-sentry-simple #8684
Conversation
- Adds test cases for several server and client-side exceptions - Allows capturing more server-side exceptions by overriding _error.js and using Sentry.captureException() within - Use @sentry/node on the server - Rely on Next.js's React Error Boundary instead of creating our own in _app.js
Found some differences while testing in production
Stats from current PRDefault Server ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
DiffsDiff for index.html@@ -6,9 +6,9 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/index.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/index.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
@@ -16,9 +16,9 @@
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -26,18 +26,18 @@
<div id="__next">Hello world 👋</div>
<script id="__NEXT_DATA__" type="application/json"
crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"8mRD6hblwxg1cKBlZ_s5W"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"PDurvl3WrNv-dVtS3Sm_l"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/index.js"
+ <script async="" data-next-page="/" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/index.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/index.module.js"
+ <script async="" data-next-page="/" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/index.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
@@ -51,15 +51,15 @@
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/378f779dcc5576ad17187046632d154bc185d8b6.155621535702fe040780.js"
+ <script src="/_next/static/chunks/a47b21b5a04498271dee62b801e10e315994953e.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Diff for link.html@@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/link.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/link.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -29,18 +29,18 @@
</div>
</div>
<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"8mRD6hblwxg1cKBlZ_s5W"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"PDurvl3WrNv-dVtS3Sm_l"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/link" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/link.js"
+ <script async="" data-next-page="/link" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/link.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/link" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/link.module.js"
+ <script async="" data-next-page="/link" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/link.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/378f779dcc5576ad17187046632d154bc185d8b6.155621535702fe040780.js"
+ <script src="/_next/static/chunks/a47b21b5a04498271dee62b801e10e315994953e.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Diff for withRouter.html@@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/withRouter.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/withRouter.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -27,18 +27,18 @@
<div>I use withRouter</div>
</div>
<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"8mRD6hblwxg1cKBlZ_s5W"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"PDurvl3WrNv-dVtS3Sm_l"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/withRouter" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/withRouter.js"
+ <script async="" data-next-page="/withRouter" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/withRouter.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/withRouter" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/withRouter.module.js"
+ <script async="" data-next-page="/withRouter" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/withRouter.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/378f779dcc5576ad17187046632d154bc185d8b6.155621535702fe040780.js"
+ <script src="/_next/static/chunks/a47b21b5a04498271dee62b801e10e315994953e.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/c46cde4798528ee0bbd76e77383cf52014f61a63.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/cc3f064c137a2f09e6635644bdee3b733d30065a.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/8mRD6hblwxg1cKBlZ_s5W/_buildManifest.module.js"
+ <script src="/_next/static/PDurvl3WrNv-dVtS3Sm_l/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Serverless ModeGeneral
Client Bundles (main, webpack, commons)
Client Bundles (main, webpack, commons) Modern
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
|
This is very well researched and incredibly in-depth! 😍 Do you think it's possible this could be extracted as it's own package rather than an example? The main reason being: I don't view this as "simple". When we have to give 10+ examples and lots of documentation/comments, it adds another layer of complexity that most people probably don't care about. Next.js is known for it's exceptional developer experience, so maybe there's a way we can make this as simple as adding a package and putting the DSN inside of Is it possible to override |
Thanks! No, I don’t know of a way for a next.config plug-in to provide I share your desire for a good dev UX. To review: if you remove the test pages, there’s 4 things a dev needs to do:
3 and 4 are made slightly more complex by the workaround for #8592. My code for 3 is somewhat lengthy, I’ll bet it could be made shorter. Maybe there’s other changes we can make to improve the readability / speed of comprehension as well. I found the test pages really helpful for developing the sample, but I could see how they clutter things. The last complex bit is documenting how Sentry deals with source maps, and what you’d need to do to get server-side maps working. The Node script I described would be especially well suited to an npm package. More ideas:
Open to other ideas too. Some automated tests would be great. None of this is really specific to Sentry either. You’d face similar issues implementing any sort of error tracking solution. |
Hey @WestonThayer, thanks for your update and PR. We right now have new RFC in drafting for handling errors reporting in Next.js. You approach is really nice, but it's not possible to handle all kind of errors. For example errors in API routes act differently and it needs a proper solution. It could work to have a wrapper around all API routes, but this is not DX we are looking for. This RFC should be public this week 😇 |
That’s awesome news @huv1k! That’s a great point about API routes. I also realized that my approach likely wouldn’t catch any exceptions thrown from Next.js itself, like if there was a bug in the webpack serverless loader, because I had played around with injecting the Sentry init as an entry in the webpack build (similar to the polyfills example), but it was really tricky figuring out which bundle it should prepend. A framework-supported approach here would be most welcome 🙏 |
Stats from current PRDefault Server Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons) Overall decrease ✓
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
Client Pages
Client Pages Modern
Client Build Manifests
Rendered Page Sizes
DiffsDiff for main-HASH.js@@ -490,7 +490,7 @@ function () {
var _ref2 = (0, _asyncToGenerator2["default"])(
/*#__PURE__*/
_regeneratorRuntime.mark(function _callee(_temp) {
- var _ref, passedWebpackHMR, initialErr, _require, isValidElementType, initialAsPath, renderCtx;
+ var _ref, passedWebpackHMR, initialErr, _require, isValidElementType, renderCtx;
return _regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
@@ -547,10 +547,7 @@ function () {
return window.__NEXT_PRELOADREADY(dynamicIds);
case 22:
- // if auto prerendered and dynamic route wait to update asPath
- // until after mount to prevent hydration mismatch
- initialAsPath = (0, _isDynamic.isDynamicRoute)(page) && data.nextExport ? page : asPath;
- exports.router = router = (0, _router.createRouter)(page, query, initialAsPath, {
+ exports.router = router = (0, _router.createRouter)(page, query, asPath, {
initialProps: props,
pageLoader: pageLoader,
App: App,
@@ -580,7 +577,7 @@ function () {
render(renderCtx);
return _context.abrupt("return", emitter);
- case 27:
+ case 26:
case "end":
return _context.stop();
} Diff for main-HASH.module.js@@ -545,12 +545,9 @@ function () {
if (window.__NEXT_PRELOADREADY) {
yield window.__NEXT_PRELOADREADY(dynamicIds);
- } // if auto prerendered and dynamic route wait to update asPath
- // until after mount to prevent hydration mismatch
-
+ }
- const initialAsPath = (0, _isDynamic.isDynamicRoute)(page) && data.nextExport ? page : asPath;
- exports.router = router = (0, _router.createRouter)(page, query, initialAsPath, {
+ exports.router = router = (0, _router.createRouter)(page, query, asPath, {
initialProps: props,
pageLoader,
App, Diff for index.html@@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/index.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/index.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -26,40 +26,40 @@
<div id="__next">Hello world 👋</div>
<script id="__NEXT_DATA__" type="application/json"
crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"gRUeFYmB5z3IvP_60yty1"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/","query":{},"buildId":"jSSb4_8Ww5S8FpHUDDX9p"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/index.js"
+ <script async="" data-next-page="/" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/index.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/index.module.js"
+ <script async="" data-next-page="/" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/index.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/runtime/main-55b45fe5fab1b051a823.js"
+ <script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
async="" crossorigin="anonymous" type="module"></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.js"
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/b5da259654a9b6b59adf8dcdae35964911794302.155621535702fe040780.js"
+ <script src="/_next/static/chunks/c9ad98c952edf84ba2e42d115d25c51fd7c622ea.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Diff for link.html@@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/link.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/link.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -29,18 +29,18 @@
</div>
</div>
<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"gRUeFYmB5z3IvP_60yty1"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/link","query":{},"buildId":"jSSb4_8Ww5S8FpHUDDX9p"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/link" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/link.js"
+ <script async="" data-next-page="/link" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/link.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/link" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/link.module.js"
+ <script async="" data-next-page="/link" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/link.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
@@ -50,19 +50,19 @@
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/b5da259654a9b6b59adf8dcdae35964911794302.155621535702fe040780.js"
+ <script src="/_next/static/chunks/c9ad98c952edf84ba2e42d115d25c51fd7c622ea.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/runtime/main-55b45fe5fab1b051a823.js"
+ <script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Diff for withRouter.html@@ -6,19 +6,19 @@
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1"
/>
<meta name="next-head-count" content="2" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/withRouter.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/withRouter.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/runtime/webpack-7928590be3ef2e55b835.module.js"
as="script" crossorigin="anonymous" />
<link rel="preload" href="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <link rel="preload" href="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <link rel="preload" href="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
as="script" crossorigin="anonymous" />
- <link rel="preload" href="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <link rel="preload" href="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
as="script" crossorigin="anonymous" />
</head>
@@ -27,18 +27,18 @@
<div>I use withRouter</div>
</div>
<script id="__NEXT_DATA__" type="application/json" crossorigin="anonymous">
- {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"gRUeFYmB5z3IvP_60yty1"}
+ {"dataManager":"[]","props":{"pageProps":{}},"page":"/withRouter","query":{},"buildId":"jSSb4_8Ww5S8FpHUDDX9p"}
</script>
<script crossorigin="anonymous" nomodule="">
!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();
</script>
- <script async="" data-next-page="/withRouter" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/withRouter.js"
+ <script async="" data-next-page="/withRouter" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/withRouter.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/withRouter" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/withRouter.module.js"
+ <script async="" data-next-page="/withRouter" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/withRouter.module.js"
crossorigin="anonymous" type="module"></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.js"
crossorigin="anonymous" nomodule=""></script>
- <script async="" data-next-page="/_app" src="/_next/static/gRUeFYmB5z3IvP_60yty1/pages/_app.module.js"
+ <script async="" data-next-page="/_app" src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/pages/_app.module.js"
crossorigin="anonymous" type="module"></script>
<script src="/_next/static/runtime/webpack-a470c2a25bcb4d5a8ec0.js"
async="" crossorigin="anonymous" nomodule=""></script>
@@ -48,19 +48,19 @@
async="" crossorigin="anonymous" nomodule=""></script>
<script src="/_next/static/chunks/framework.cdb73e402d876d4ac87f.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/chunks/b5da259654a9b6b59adf8dcdae35964911794302.155621535702fe040780.js"
+ <script src="/_next/static/chunks/c9ad98c952edf84ba2e42d115d25c51fd7c622ea.155621535702fe040780.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.b3f63bf01308f3d17f5c.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.b3f63bf01308f3d17f5c.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/chunks/0f98677a7ba5c3c05d5e4640f9c783d44b41c5e0.85e4c18b9e4b400e5496.module.js"
+ <script src="/_next/static/chunks/52b3f2352500f338aa504b72584f60a0e6538f7e.85e4c18b9e4b400e5496.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/runtime/main-55b45fe5fab1b051a823.js"
+ <script src="/_next/static/runtime/main-26e9253859bbcb659328.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/runtime/main-0d26b819b58d326b70e7.module.js"
+ <script src="/_next/static/runtime/main-e3367c6cc0a826287f74.module.js"
async="" crossorigin="anonymous" type="module"></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.js"
async="" crossorigin="anonymous" nomodule=""></script>
- <script src="/_next/static/gRUeFYmB5z3IvP_60yty1/_buildManifest.module.js"
+ <script src="/_next/static/jSSb4_8Ww5S8FpHUDDX9p/_buildManifest.module.js"
async="" crossorigin="anonymous" type="module"></script>
</body> Serverless Mode (Decrease detected ✓)General Overall decrease ✓
Client Bundles (main, webpack, commons) Overall decrease ✓
Client Bundles (main, webpack, commons) Modern Overall decrease ✓
Client Pages
Client Pages Modern
Client Build Manifests
Serverless bundles
|
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.
Thx @WestonThayer, for your PR. We are going to merge it until we have a proper solution for logging errors. Like I said before we are going to introduce new RFC for error reporting, stay tunned.
vercel/next.js#8684 Signed-off-by: Logan McAnsh <logan@mcan.sh>
Any news for the improved error reporting @huv1k Otherwise I would go with this sentry example for now. Thanks for all your work @WestonThayer 🚀 |
index.js
_error.js
and usingSentry.captureException()
within (this should fix with-sentry-simple example doesn't work in server although it says it does. #8106)@sentry/node
on the server to capture even more server-side exceptions_app.js
Blocked: While server-side exceptions work fine locally, when deployed with
target: "serverless"
on Zeit Now, the lambda exits before Sentry gets a chance to send. Tracking via #8685