From 2d668f790ce78290363bf0c1ee8d52078b1a53ce Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Thu, 9 Jan 2025 15:39:39 +0100 Subject: [PATCH 1/8] Rework Next.js quick start guide (wizard) --- docs/platforms/javascript/common/index.mdx | 46 +++++++++++++++- .../javascript/guides/nextjs/config.yml | 4 +- .../javascript.nextjs.mdx | 27 +++++----- .../javascript.nextjs.mdx | 18 +++++++ .../javascript.nextjs.mdx | 25 ++------- .../javascript.nextjs.mdx | 52 +++++++------------ 6 files changed, 101 insertions(+), 71 deletions(-) create mode 100644 platform-includes/getting-started-next-steps/javascript.nextjs.mdx diff --git a/docs/platforms/javascript/common/index.mdx b/docs/platforms/javascript/common/index.mdx index 3b0cae9c6bcd6..6e9310f01f9f8 100644 --- a/docs/platforms/javascript/common/index.mdx +++ b/docs/platforms/javascript/common/index.mdx @@ -16,7 +16,10 @@ Check out the other SDKs we support in the left-hand dropdown. ## Prerequisites -* You need a Sentry [account](https://sentry.io/signup/) and [project](/product/projects/) +You need: + +- A Sentry [account](https://sentry.io/signup/) and [project](/product/projects/) +- Your application up and running @@ -32,11 +35,33 @@ Select which Sentry features you'd like to install in addition to Error Monitori + + +## Step 1: Choose Your Sentry Features (Optional) + +During setup, you'll have the option to enable specific Sentry features for your application. +Here's a quick overview of what's what: + +- [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, uncaught exceptions, and unhandled rejections. If you have something that looks like an exception, Sentry can capture it. +- **Tunneling**: Route browser requests to Sentry through a Next.js rewrite to bypass ad-blockers that might interfere with Sentry's data collection. +- [**Tracing**](/product/tracing): Track software performance while seeing the impact of errors across multiple systems. For example, distributed tracing allows you to follow a request from the frontend to the backend and back. +- [**Session Replay**](/product/explore/session-replay/web/getting-started/): Get to the root cause of an issue faster by viewing a video-like reproduction of what was happening in the user's browser before, during, and after the problem. + +## Step 2: Install + + + + + ## Install + + - + @@ -64,12 +89,17 @@ Select which Sentry features you'd like to install in addition to Error Monitori + + Sentry captures data by using an SDK within your application’s runtime. + + + ## Configure @@ -86,6 +116,8 @@ Sentry supports multiple versions of React Router. To learn how to configure the + + @@ -96,6 +128,14 @@ Sentry supports multiple versions of React Router. To learn how to configure the + + + + + + + + ## Verify This snippet includes an intentional error, so you can test that everything is working as soon as you set it up. @@ -110,4 +150,6 @@ Learn more about manually capturing an error or message in our + diff --git a/docs/platforms/javascript/guides/nextjs/config.yml b/docs/platforms/javascript/guides/nextjs/config.yml index bed3f7977d4c5..87587bbfe0184 100644 --- a/docs/platforms/javascript/guides/nextjs/config.yml +++ b/docs/platforms/javascript/guides/nextjs/config.yml @@ -1,5 +1,5 @@ -title: Next.js -description: Next.js is a flexible React framework that gives you building blocks to create fast, full-stack web applications. Learn how to set it up with Sentry. +title: 'Next.js' +description: Learn how to set up and configure Sentry in your Next.js application using the installation wizard, capture your first errors, and view them in Sentry. sdk: sentry.javascript.nextjs categories: - javascript diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 6f31f16534b08..2c168570945a7 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -1,24 +1,25 @@ -We recommend installing the SDK through our installation wizard: +To install Sentry using the installation wizard, run the following command within your project: ```bash npx @sentry/wizard@latest -i nextjs ``` -The wizard will prompt you to log in to Sentry. It will then automatically do the following steps for you: +The wizard starts guiding you through the setup process, which also includes enabling the Sentry features listed above. -- create config files with the default `Sentry.init()` calls for each runtime (node, browser, edge) -- add a Next.js instrumentation hook to your project (`instrumentation.ts`) -- create or update your Next.js config with the default Sentry configuration -- create `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`) -- add an example page to your app to verify your Sentry setup + -After the wizard setup is completed, the SDK will automatically capture unhandled errors, and monitor performance. -You can also manually capture errors. +This guide assumes you enable all Sentry features during the wizard setup and allow it to create an example page and route. If you make different choices, you can still follow along, but you may need to make adjustments as you proceed. -To learn how to connect your app to Sentry and deploy it on Vercel, see the [Vercel integration](/organization/integrations/deployment/vercel/). + - +You can always add or remove config options manually later if needed. Though, the earlier you set these up, the better. -If the setup through the wizard doesn't work for you, you can also set up the SDK manually. + - +- Create config files with the default `Sentry.init()` calls for each runtime (node, browser, edge) +- Add a Next.js instrumentation hook to your project (`instrumentation.ts`) +- Create or update your Next.js config with the default Sentry settings +- Create `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`) +- Add an example page and route to your application to help verify your Sentry setup + + diff --git a/platform-includes/getting-started-next-steps/javascript.nextjs.mdx b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx new file mode 100644 index 0000000000000..95e2e210fafe8 --- /dev/null +++ b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx @@ -0,0 +1,18 @@ +## Next Steps + +You should now have integrated Sentry into your Next.js application and should already be sending error and performance data to your Sentry project. + +Now's a good time to customize your setup and look into more advanced topics. +Our next recommended steps for you are: + +- Learn more about our [Vercel integration](/organization/integrations/deployment/vercel/) +- Continue to [customize your configuration](/platforms/javascript/guides/nextjs/configuration/) +- Learn how to [manually capture errors](/platforms/javascript/guides/nextjs/usage/) +- Get familiar with [Sentry's product features](/product) like tracing, insights, and alerts + + + +- If you encountered issues with our installation wizard, try [setting up Sentry manually](/platforms/javascript/guides/nextjs/manual-setup/) +- [Get support](https://sentry.zendesk.com/hc/en-us/) + + diff --git a/platform-includes/getting-started-primer/javascript.nextjs.mdx b/platform-includes/getting-started-primer/javascript.nextjs.mdx index b17d52df89472..2c8bb678a4352 100644 --- a/platform-includes/getting-started-primer/javascript.nextjs.mdx +++ b/platform-includes/getting-started-primer/javascript.nextjs.mdx @@ -1,24 +1,9 @@ -Features: + -- Automatic [Error Tracking](/product/issues/) with source maps for both JavaScript and TypeScript -- Automatic [Tracing](/product/performance/) for both the client and server -- Errors and Performance support for [Middleware](https://vercel.com/docs/concepts/functions/edge-middleware) and [Edge routes](https://vercel.com/docs/concepts/functions/edge-functions) in Vercel's edge runtime. Due to complexities with the runtime, some features of errors like stack traces may not be as expected. Requires sentry.edge.config.js, more info [here](/platforms/javascript/guides/nextjs/manual-setup/#create-initialization-config-files) -- Events [enriched](/platforms/javascript/enriching-events/context/) with device data -- [Breadcrumbs](/platforms/javascript/enriching-events/breadcrumbs/) created for outgoing HTTP request with XHR and Fetch, and console logs -- [Release health](/product/releases/health/) for tracking crash-free users and sessions +The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. - +However, Sentry will work fine in your production builds. -The Sentry SDK does not fully support `next dev --turbo` while Turbopack does not ship all the features required to run Sentry. +Check the latest information on [Sentry's support for Turbopack on GitHub](https://github.com/getsentry/sentry-javascript/issues/8105). -Currently, when you run your devserver with Turbopack, the Sentry Next.js SDK will not be loaded in the browser. -Keep this in mind when configuring the SDK. - -Note that this only affects the devserver. -The Sentry SDK will run without issues when you do a production build, even if you develop locally with Turbopack. - -To support the SDK in the browser with Turbopack, [follow the feature request for client-side instrumentation in the Next.js repository](https://github.com/vercel/next.js/discussions/69294). - -You can track Sentry's Turbopack support in the [GitHub Issue in the Sentry SDK repository](https://github.com/getsentry/sentry-javascript/issues/8105). - - + diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index d969d897985e7..410e7be485d90 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -1,46 +1,30 @@ -Add a button to a frontend component that throws an error: +## Step 3: Verify Your Setup -```javascript {filename:pages/index.js} - -``` +Let's confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. -And throw an error in an API route: +1. Open the example page at [http://localhost:3000/sentry-example-page](http://localhost:3000/sentry-example-page) +2. Click the "Throw error" button. This triggers two errors: + - a frontend error + - an error within the API route -```javascript {filename:pages/api/error.js} -export default (req, res) => { - throw new Error("API throw error test"); - res.status(200).json({ name: "John Doe" }); -}; -``` +Sentry will capture both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete. -```typescript {filename:pages/api/error.ts} -import type { NextApiRequest, NextApiResponse } from "next"; + -export default (req: NextApiRequest, res: NextApiResponse) => { - throw new Error("API throw error test"); - res.status(200).json({ name: "John Doe" }); -}; -``` +Make sure to explore the example files' code in your project to understand what's happening after your button click. - - -Errors triggered from within Browser DevTools are sandboxed, so they will not trigger error monitoring. Keep this in mind when verifying your Sentry SDK installation. - - + - +### View Captured Data in Sentry -Prior to Next.js version 15, errors thrown in nested React Server Components were not exposed by the framework, preventing the SDK from capturing them. +Now head over to your Sentry project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear). -Next.js 15 introduced an `onRequestError` hook in `instrumentation.ts` that allows capturing and reporting these errors. + -Refer to Capturing Errors From Nested React Server Components for detailed setup instructions. +Errors triggered from within your browser's developer tools are sandboxed, so they will not trigger Sentry's error monitoring. + +1. Open the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues) page and select an error from the issues list to view the full details and context of this error. For an interactive UI walkthrough, click [here](/product/sentry-basics/integrate-frontend/generate-first-error/#ui-walkthrough). +2. Open the [**Traces**](https://sentry.io/orgredirect/organizations/:orgslug/traces) page and select a trace to reveal more information about each span, its duration, and any errors. For an interactive UI walkthrough, click [here](/product/sentry-basics/distributed-tracing/generate-first-error/#ui-walkthrough). +3. Open the [**Replays**](https://sentry.io/orgredirect/organizations/:orgslug/replays) page and select an entry from the list to get a detailed view where you can replay the interaction and get more information to help you troubleshoot. From 4712da15bb445fa8f4e30ff4257dcb798bcc145f Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Tue, 14 Jan 2025 11:55:22 +0100 Subject: [PATCH 2/8] Remove permalink prop from Expandable Co-authored-by: Charly Gomez --- platform-includes/getting-started-install/javascript.nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 2c168570945a7..4d74148dcc393 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -14,7 +14,7 @@ This guide assumes you enable all Sentry features during the wizard setup and al You can always add or remove config options manually later if needed. Though, the earlier you set these up, the better. - + - Create config files with the default `Sentry.init()` calls for each runtime (node, browser, edge) - Add a Next.js instrumentation hook to your project (`instrumentation.ts`) From e183e6a042c21fd55254f1b376bc20a683d422ee Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Tue, 14 Jan 2025 12:18:26 +0100 Subject: [PATCH 3/8] integrate pr feedback --- docs/platforms/javascript/common/index.mdx | 1 - .../getting-started-install/javascript.nextjs.mdx | 2 +- .../getting-started-next-steps/javascript.nextjs.mdx | 4 ++-- .../getting-started-primer/javascript.nextjs.mdx | 4 +--- .../getting-started-verify/javascript.nextjs.mdx | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/docs/platforms/javascript/common/index.mdx b/docs/platforms/javascript/common/index.mdx index 6e9310f01f9f8..a3979af5b1543 100644 --- a/docs/platforms/javascript/common/index.mdx +++ b/docs/platforms/javascript/common/index.mdx @@ -43,7 +43,6 @@ During setup, you'll have the option to enable specific Sentry features for your Here's a quick overview of what's what: - [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, uncaught exceptions, and unhandled rejections. If you have something that looks like an exception, Sentry can capture it. -- **Tunneling**: Route browser requests to Sentry through a Next.js rewrite to bypass ad-blockers that might interfere with Sentry's data collection. - [**Tracing**](/product/tracing): Track software performance while seeing the impact of errors across multiple systems. For example, distributed tracing allows you to follow a request from the frontend to the backend and back. - [**Session Replay**](/product/explore/session-replay/web/getting-started/): Get to the root cause of an issue faster by viewing a video-like reproduction of what was happening in the user's browser before, during, and after the problem. diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 4d74148dcc393..e50bbbc7e0e7f 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -16,7 +16,7 @@ You can always add or remove config options manually later if needed. Though, th -- Create config files with the default `Sentry.init()` calls for each runtime (node, browser, edge) +- Create config files with the default `Sentry.init()` calls for all runtimes (Node.js, Browser, and Edge) - Add a Next.js instrumentation hook to your project (`instrumentation.ts`) - Create or update your Next.js config with the default Sentry settings - Create `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`) diff --git a/platform-includes/getting-started-next-steps/javascript.nextjs.mdx b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx index 95e2e210fafe8..c699d57ca1440 100644 --- a/platform-includes/getting-started-next-steps/javascript.nextjs.mdx +++ b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx @@ -5,10 +5,10 @@ You should now have integrated Sentry into your Next.js application and should a Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are: -- Learn more about our [Vercel integration](/organization/integrations/deployment/vercel/) -- Continue to [customize your configuration](/platforms/javascript/guides/nextjs/configuration/) - Learn how to [manually capture errors](/platforms/javascript/guides/nextjs/usage/) +- Continue to [customize your configuration](/platforms/javascript/guides/nextjs/configuration/) - Get familiar with [Sentry's product features](/product) like tracing, insights, and alerts +- Learn more about our [Vercel integration](/organization/integrations/deployment/vercel/) diff --git a/platform-includes/getting-started-primer/javascript.nextjs.mdx b/platform-includes/getting-started-primer/javascript.nextjs.mdx index 2c8bb678a4352..024443d656cff 100644 --- a/platform-includes/getting-started-primer/javascript.nextjs.mdx +++ b/platform-includes/getting-started-primer/javascript.nextjs.mdx @@ -1,8 +1,6 @@ -The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. - -However, Sentry will work fine in your production builds. +The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data for the frontend. Other than that, your devserver should be fully operational. Check the latest information on [Sentry's support for Turbopack on GitHub](https://github.com/getsentry/sentry-javascript/issues/8105). diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index 410e7be485d90..09e408b7450ef 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -21,7 +21,7 @@ Now head over to your Sentry project on [Sentry.io](https://sentry.io) to view t -Errors triggered from within your browser's developer tools are sandboxed, so they will not trigger Sentry's error monitoring. +Errors triggered from within your browser's developer tools (i.e., the browser console) are sandboxed, so they will not trigger Sentry's error monitoring. From e7707fce06ec34a556363a729e2f89f2eb92f710 Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Thu, 16 Jan 2025 12:34:50 +0100 Subject: [PATCH 4/8] updated structure and put more content into expandables. Testing out some ideas. --- docs/platforms/javascript/common/index.mdx | 11 +-------- .../javascript.nextjs.mdx | 21 +++++++++++++--- .../javascript.nextjs.mdx | 6 ----- .../javascript.nextjs.mdx | 24 ++++++++++++++----- 4 files changed, 37 insertions(+), 25 deletions(-) diff --git a/docs/platforms/javascript/common/index.mdx b/docs/platforms/javascript/common/index.mdx index a3979af5b1543..30eb612facb08 100644 --- a/docs/platforms/javascript/common/index.mdx +++ b/docs/platforms/javascript/common/index.mdx @@ -37,16 +37,7 @@ Select which Sentry features you'd like to install in addition to Error Monitori -## Step 1: Choose Your Sentry Features (Optional) - -During setup, you'll have the option to enable specific Sentry features for your application. -Here's a quick overview of what's what: - -- [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, uncaught exceptions, and unhandled rejections. If you have something that looks like an exception, Sentry can capture it. -- [**Tracing**](/product/tracing): Track software performance while seeing the impact of errors across multiple systems. For example, distributed tracing allows you to follow a request from the frontend to the backend and back. -- [**Session Replay**](/product/explore/session-replay/web/getting-started/): Get to the root cause of an issue faster by viewing a video-like reproduction of what was happening in the user's browser before, during, and after the problem. - -## Step 2: Install +## Step 1: Install diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index e50bbbc7e0e7f..2f9f464229526 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -4,15 +4,30 @@ To install Sentry using the installation wizard, run the following command withi npx @sentry/wizard@latest -i nextjs ``` -The wizard starts guiding you through the setup process, which also includes enabling the Sentry features listed above. +The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring. + + + +- [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, + uncaught exceptions, and unhandled rejections. If you have something that + looks like an exception, Sentry can capture it. +- [**Tracing**](/product/tracing): Track software performance while seeing the + impact of errors across multiple systems. For example, distributed tracing + allows you to follow a request from the frontend to the backend and back. +- [**Session Replay**](/product/explore/session-replay/web/getting-started/): + Get to the root cause of an issue faster by viewing a video-like reproduction + of what was happening in the user's browser before, during, and after the + problem. + + -This guide assumes you enable all Sentry features during the wizard setup and allow it to create an example page and route. If you make different choices, you can still follow along, but you may need to make adjustments as you proceed. +This guide assumes that you enable all features and allow the wizard to create an example page and route. Keep this in mind as you proceed. -You can always add or remove config options manually later if needed. Though, the earlier you set these up, the better. +You can always add or remove features manually later if needed. Though, the earlier you set these up, the better. diff --git a/platform-includes/getting-started-primer/javascript.nextjs.mdx b/platform-includes/getting-started-primer/javascript.nextjs.mdx index 024443d656cff..8b137891791fe 100644 --- a/platform-includes/getting-started-primer/javascript.nextjs.mdx +++ b/platform-includes/getting-started-primer/javascript.nextjs.mdx @@ -1,7 +1 @@ - -The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data for the frontend. Other than that, your devserver should be fully operational. - -Check the latest information on [Sentry's support for Turbopack on GitHub](https://github.com/getsentry/sentry-javascript/issues/8105). - - diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index 09e408b7450ef..8f1ab81d47724 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -1,23 +1,31 @@ -## Step 3: Verify Your Setup +## Step 2: Verify Your Setup -Let's confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. + -1. Open the example page at [http://localhost:3000/sentry-example-page](http://localhost:3000/sentry-example-page) +The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data for the frontend. Other than that, your devserver should be fully operational. + +Check the latest information on [Sentry's support for Turbopack on GitHub](https://github.com/getsentry/sentry-javascript/issues/8105). + + + +If you haven't tested your setup yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. + +1. Open the example page `/sentry-example-page`. 2. Click the "Throw error" button. This triggers two errors: - a frontend error - an error within the API route -Sentry will capture both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete. +Sentry captures both of these errors for you. Additionally, the button click starts a performance trace to measure the time it takes for the API request to complete. -Make sure to explore the example files' code in your project to understand what's happening after your button click. +Don't forget to explore the example files' code in your project to understand what's happening after your button click. ### View Captured Data in Sentry -Now head over to your Sentry project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear). +Now, head over to your project on [Sentry.io](https://sentry.io) to view the collected data (it takes a couple of moments for the data to appear). @@ -25,6 +33,10 @@ Errors triggered from within your browser's developer tools (i.e., the browser c + + 1. Open the [**Issues**](https://sentry.io/orgredirect/organizations/:orgslug/issues) page and select an error from the issues list to view the full details and context of this error. For an interactive UI walkthrough, click [here](/product/sentry-basics/integrate-frontend/generate-first-error/#ui-walkthrough). 2. Open the [**Traces**](https://sentry.io/orgredirect/organizations/:orgslug/traces) page and select a trace to reveal more information about each span, its duration, and any errors. For an interactive UI walkthrough, click [here](/product/sentry-basics/distributed-tracing/generate-first-error/#ui-walkthrough). 3. Open the [**Replays**](https://sentry.io/orgredirect/organizations/:orgslug/replays) page and select an entry from the list to get a detailed view where you can replay the interaction and get more information to help you troubleshoot. + + From 25b37d9601971b91186c79810c8d92c3baa22782 Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Thu, 16 Jan 2025 15:07:54 +0100 Subject: [PATCH 5/8] Expandable title update Co-authored-by: Francesco Gringl-Novy --- platform-includes/getting-started-install/javascript.nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 2f9f464229526..9b2f8f0768d43 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -6,7 +6,7 @@ npx @sentry/wizard@latest -i nextjs The wizard then guides you through the setup process, asking you to enable additional (optional) Sentry features for your application beyond error monitoring. - + - [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, uncaught exceptions, and unhandled rejections. If you have something that From abbeca1bb3ee632749028e9380e4daeb53091750 Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Mon, 27 Jan 2025 12:09:25 +0100 Subject: [PATCH 6/8] minor text updates to improve clarity --- .../getting-started-install/javascript.nextjs.mdx | 8 +------- .../getting-started-verify/javascript.nextjs.mdx | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 9b2f8f0768d43..6838121a437bc 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -21,13 +21,7 @@ The wizard then guides you through the setup process, asking you to enable addit - - -This guide assumes that you enable all features and allow the wizard to create an example page and route. Keep this in mind as you proceed. - - - -You can always add or remove features manually later if needed. Though, the earlier you set these up, the better. +This guide assumes that you enable all features and allow the wizard to create an example page and route. You can add or remove features at any time, but setting them up now will save you the effort of configuring them manually later. diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index 8f1ab81d47724..c8b7853f5e05d 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -1,6 +1,6 @@ ## Step 2: Verify Your Setup - + The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data for the frontend. Other than that, your devserver should be fully operational. @@ -10,7 +10,7 @@ Check the latest information on [Sentry's support for Turbopack on GitHub](https If you haven't tested your setup yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. -1. Open the example page `/sentry-example-page`. +1. Open the example page `/sentry-example-page` in your browser. 2. Click the "Throw error" button. This triggers two errors: - a frontend error - an error within the API route From 72bc6028accc6f75b6e1feb8fe7fdc82a8c69271 Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Thu, 30 Jan 2025 11:55:13 +0100 Subject: [PATCH 7/8] Alex feedback --- .../getting-started-install/javascript.nextjs.mdx | 14 +++++++------- .../javascript.nextjs.mdx | 2 +- .../getting-started-verify/javascript.nextjs.mdx | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/platform-includes/getting-started-install/javascript.nextjs.mdx b/platform-includes/getting-started-install/javascript.nextjs.mdx index 6838121a437bc..810b56e4a3191 100644 --- a/platform-includes/getting-started-install/javascript.nextjs.mdx +++ b/platform-includes/getting-started-install/javascript.nextjs.mdx @@ -8,13 +8,13 @@ The wizard then guides you through the setup process, asking you to enable addit -- [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors, +- [**Issues**](/product/issues) (always enabled): Sentry's core error monitoring product that automatically reports errors, uncaught exceptions, and unhandled rejections. If you have something that looks like an exception, Sentry can capture it. - [**Tracing**](/product/tracing): Track software performance while seeing the impact of errors across multiple systems. For example, distributed tracing allows you to follow a request from the frontend to the backend and back. -- [**Session Replay**](/product/explore/session-replay/web/getting-started/): +- [**Session Replay**](/product/explore/session-replay/web): Get to the root cause of an issue faster by viewing a video-like reproduction of what was happening in the user's browser before, during, and after the problem. @@ -25,10 +25,10 @@ This guide assumes that you enable all features and allow the wizard to create a -- Create config files with the default `Sentry.init()` calls for all runtimes (Node.js, Browser, and Edge) -- Add a Next.js instrumentation hook to your project (`instrumentation.ts`) -- Create or update your Next.js config with the default Sentry settings -- Create `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`) -- Add an example page and route to your application to help verify your Sentry setup +- Creates config files with the default `Sentry.init()` calls for all runtimes (Node.js, Browser, and Edge) +- Adds a Next.js instrumentation hook to your project (`instrumentation.ts`) +- Creates or updates your Next.js config with the default Sentry settings +- Creates `.sentryclirc` with an auth token to upload source maps (this file is automatically added to `.gitignore`) +- Adds an example page and route to your application to help verify your Sentry setup diff --git a/platform-includes/getting-started-next-steps/javascript.nextjs.mdx b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx index c699d57ca1440..0df6191599bc5 100644 --- a/platform-includes/getting-started-next-steps/javascript.nextjs.mdx +++ b/platform-includes/getting-started-next-steps/javascript.nextjs.mdx @@ -1,6 +1,6 @@ ## Next Steps -You should now have integrated Sentry into your Next.js application and should already be sending error and performance data to your Sentry project. +At this point, you should have integrated Sentry into your Next.js application and should already be sending error and performance data to your Sentry project. Now's a good time to customize your setup and look into more advanced topics. Our next recommended steps for you are: diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index c8b7853f5e05d..762a16e62d434 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -2,15 +2,15 @@ -The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data for the frontend. Other than that, your devserver should be fully operational. +The Sentry SDK doesn't fully support `next dev --turbo` as Turbopack is still under development. This means that the Sentry SDK will not capture any data from your frontend. Other than that, your dev server should be fully operational. Check the latest information on [Sentry's support for Turbopack on GitHub](https://github.com/getsentry/sentry-javascript/issues/8105). -If you haven't tested your setup yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. +If you haven't tested your configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. -1. Open the example page `/sentry-example-page` in your browser. +1. Open the example page `/sentry-example-page` in your browser. For most Next.js applications, this will be at localhost. 2. Click the "Throw error" button. This triggers two errors: - a frontend error - an error within the API route From e85c74e757ae89e4e8628173157734e07639f94f Mon Sep 17 00:00:00 2001 From: Sarah Mischinger Date: Thu, 30 Jan 2025 12:01:40 +0100 Subject: [PATCH 8/8] mini update Alex feedback --- platform-includes/getting-started-verify/javascript.nextjs.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform-includes/getting-started-verify/javascript.nextjs.mdx b/platform-includes/getting-started-verify/javascript.nextjs.mdx index 762a16e62d434..68f15637aebe5 100644 --- a/platform-includes/getting-started-verify/javascript.nextjs.mdx +++ b/platform-includes/getting-started-verify/javascript.nextjs.mdx @@ -8,7 +8,7 @@ Check the latest information on [Sentry's support for Turbopack on GitHub](https -If you haven't tested your configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard. +If you haven't tested your Sentry configuration yet, let's do it now. You can confirm that Sentry is working properly and sending data to your Sentry project by using the example page and route created by the installation wizard: 1. Open the example page `/sentry-example-page` in your browser. For most Next.js applications, this will be at localhost. 2. Click the "Throw error" button. This triggers two errors: