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

Sentry: Enable autoInstrumentServerFunctions #1522

Closed
wants to merge 7 commits into from

Conversation

masonmcelvain
Copy link
Contributor

Enables error monitoring on api routes and data fetching methods (like getServerSideProps).

https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/#configure-server-side-auto-instrumentation

@vercel
Copy link

vercel bot commented Mar 31, 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 31, 2023 at 7:57PM (UTC)
react-commerce-prod ✅ Ready (Inspect) Visit Preview 💬 Add your feedback Mar 31, 2023 at 7:57PM (UTC)

@github-actions
Copy link
Contributor

github-actions bot commented Mar 31, 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.45 KB (🟡 +3.82 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.73 KB

One Page Changed Size

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

Page Size (compressed) First Load
/_error 468 B (🟢 -195 B) 357.9 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

@dhmacs I see that we added autoInstrumentServerFunctions: false in f13399d. If you remember, could you describe the motivation for adding that option? It's unclear to me based on the context of the PR. It might be preventing us from sending certain kinds of errors to Sentry (see getsentry/sentry-javascript#7602 (comment)), though there are workarounds.

danielbeardsley and others added 3 commits March 31, 2023 12:47
Ran "npx @sentry/wizard -i nextjs" and comitted the new eror page.

The old one was similar, but was generated a year ago.
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.

2 participants