Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Make Sentry report errors on Vercel 🤞🏻 #1494

Closed
wants to merge 7 commits into from

Conversation

masonmcelvain
Copy link
Contributor

@vercel
Copy link

vercel bot commented Mar 21, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
react-commerce ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 7:05PM (UTC)
react-commerce-prod ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 23, 2023 at 7:05PM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 21, 2023

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 357.01 KB (🟡 +3.49 KB)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

New Page Added

The following page was added to the bundle from the code in this PR:

Page Size (compressed) First Load
/myPage 290 B 357.29 KB

Ten Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/404 8.11 KB (🟡 +3 B) 365.12 KB
/Parts 50.03 KB (🟡 +2 B) 407.03 KB
/Parts/[...deviceHandleItemType] 50.05 KB (🟡 +2 B) 407.05 KB
/Shop/[handle] 50.03 KB (🟡 +2 B) 407.04 KB
/Tools 50.03 KB (🟡 +2 B) 407.03 KB
/Tools/[handle] 50.03 KB (🟡 +2 B) 407.04 KB
/Vulcan/[wikiname] 11.68 KB (🟡 +3 B) 368.68 KB
/_error 468 B (🟢 -195 B) 357.46 KB
/products/[handle] 82.92 KB (🟡 +4 B) 439.92 KB
/store 42.41 KB (🟡 +3 B) 399.41 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@masonmcelvain
Copy link
Contributor Author

@danielbeardsley
Copy link
Member

for what it's worth, I don't think we have any "edge functions" in vercel's lingo.

image

@masonmcelvain masonmcelvain force-pushed the sentry-not-reporting-on-vercel branch from 6af8f15 to a8df098 Compare March 22, 2023 21:12
@masonmcelvain
Copy link
Contributor Author

So /myPage?myParam=two (the repro from getsentry/sentry-javascript#6117) gets reported to Sentry, so that means general errors thrown in getServerSideProps are being reported. Phew. Here are it's logs in Vercel:

Error: We don't like page two
    at getServerSideProps (/var/task/frontend/.next/server/pages/myPage.js:27:15)
    at Object.renderToHTML (/var/task/node_modules/.pnpm/[email protected]_t7ss3ubh4wigfvyfclbvqff3gm/node_modules/next/dist/server/render.js:573:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async doRender (/var/task/node_modules/.pnpm/[email protected]_t7ss3ubh4wigfvyfclbvqff3gm/node_modules/next/dist/server/base-server.js:915:38)
    at async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate (/var/task/node_modules/.pnpm/[email protected]_t7ss3ubh4wigfvyfclbvqff3gm/node_modules/next/dist/server/base-server.js:1020:28)
    at async /var/task/node_modules/.pnpm/[email protected]_t7ss3ubh4wigfvyfclbvqff3gm/node_modules/next/dist/server/response-cache.js:69:36 {
  page: '/myPage'
}
RequestId: a167823c-25dc-47bb-b72f-9bc0664500ff Error: Runtime exited with error: exit status 1
Runtime.ExitError

However, the original error url still doesn't get reported to Sentry. Here are it's error logs in Vercel:

a9cc-630153f1bc96	INFO	Sentry Logger [log]: SDK successfully initialized
context.resolvedUrl /Parts/MacBook_Pro/Display_Components?p=-1%20OR%203%2B947-947-1%3D0%2B0%2B0%2B1
context.req.url /Parts/MacBook_Pro/Display_Components?p=-1%20OR%203%2B947-947-1%3D0%2B0%2B0%2B1
Cache miss for 'storeList' => 42.14ms
Cache miss for 'globalSettings' => 259.93ms
strapi.getProductList => 407.83ms
Cache miss for 'store-test' => 458.96ms
layoutProps => 476.69ms
iFixit API GET:cart/part_collections/devices/MacBook_Pro => 809.22ms
algolia.findDescendantDevicesWithProducts => 25.88ms
findProductList => 842.62ms
Unhandled Promise Rejection 	{"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"ApiError: Value too small for \"page\" parameter, expected integer between 0 and 9223372036854775807","trace":["Runtime.UnhandledPromiseRejection: ApiError: Value too small for \"page\" parameter, expected integer between 0 and 9223372036854775807","    at process.<anonymous> (file:///var/runtime/index.mjs:1188:17)","    at process.emit (node:events:525:35)","    at process.emit (node:domain:489:12)","    at emit (node:internal/process/promises:140:20)","    at processPromiseRejections (node:internal/process/promises:274:27)","    at processTicksAndRejections (node:internal/process/task_queues:97:32)"]}
Unknown application error occurred
Runtime.Unknown

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some errors are not reported to sentry
2 participants