Skip to content

Conversation

@inventarSarah
Copy link
Collaborator

DESCRIBE YOUR PR

Reworked the Next.js Getting Started Guide into a Quick Start Guide.
See #12288 (and parent #11859)

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

EXTRA RESOURCES

@vercel
Copy link

vercel bot commented Jan 9, 2025

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

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 11:24am
2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
changelog ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 11:24am
develop-docs ⬜️ Ignored (Inspect) Visit Preview Jan 30, 2025 11:24am

@codecov
Copy link

codecov bot commented Jan 9, 2025

Bundle Report

Changes will increase total bundle size by 228 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sentry-docs-server-cjs 10.37MB 234 bytes (0.0%) ⬆️
sentry-docs-client-array-push 9.3MB 6 bytes (-0.0%) ⬇️

Copy link
Contributor

@lforst lforst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love that we give this page some attention! Since this page is so critical though, we should be rather selective how much we bombard users with information. Additionally, the information we give them needs to be bulletproof. Anything in the wrong place will spark immense confusion.


<PlatformSection supported={["javascript.nextjs"]}>

## Step 1: Choose Your Sentry Features (Optional)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would honestly remove this entire section. It's irrelevant to the setup in the docs since it's pretty much always gonna be the same because the wizard will already let you choose.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my response to a similar comment here: #12291 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are very conflicting opinions on adding a paragraph like this. IIRC we flipped back and fourth 4 times on having this paragraph vs not having it in the last 2 years.

I personally, don't think SDK onboarding is the place to go into that stuff. I do however see the value behind capturing people who know nothing about Sentry yet. How about instead of having a 3 point paragraph, we do a simple sentence like, "This guide will tell you how to hook up your application with the Sentry SDK. If you want to know more about Sentry itself go here."

Copy link
Collaborator Author

@inventarSarah inventarSarah Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's a hot topic, as I've learned :)! There are already discussions about moving these features to another location (e.g. an SDK landing page). And then, as you wrote, for example, link to it from the quick start page.
However, since we currently don't yet have a place for it, I'd like to leave the information here.
Or do you know of a page we could link to?
If not, is it okay for you to leave it like this for the time being?

I'm also working on the Next.js quick start guide for manual setup -> this page will also need to communicate the features to the user (including onboarding option checkboxes). How we will solve this in detail will probably also influence the quick start guide for the wizard setup (and vice versa).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, we can keep it for now!

@@ -1,46 +1,30 @@
Add a button to a frontend component that throws an error:
## Step 3: Verify Your Setup
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this section because the wizard will tell you to do this. We should avoid putting information in multiple places. If the wizard is missing information that we would have added here, we should add it to the wizard instead. My working theory is that once people run the wizard command, they will not look back into the docs until they are done with looking at the error in Sentry. At which point all of this text is already irrelevant. What's more important in that moment is the Next Steps.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand you're suggesting we simplify the guide to only include "Prerequisites," "Install," and "Next Steps." -- Did I get this right?

This is a new idea, and I'd like to share it with the others to get their input as well (hopefully tomorrow).

I see the advantages of having a shorter guide and relying more on the wizard.
However, there are a few points we need to be mindful about:

  • once the terminal window in which the wizard ran is closed, all its information is gone; the quick start guide is always accessible
  • "they will not look back into the docs until they are done with looking at the error in Sentry" - on the other hand, we probably also have users who don't read all the text in the terminal (I'm such a candidate, for example). Especially everything that comes after the green Success message may be perceived as "not important"; ideally, we can make both of these user types happy
  • many users who use this type of guide are probably new and don't know much about Sentry yet. So the quick start guide is a great place to introduce them to features beyond error monitoring and provide links to more information -> but we have also talked about providing this info somewhere else (eg. on a landing page Have quick start as a menu item #12289)

this is also relevant to your comment on the features: /#discussion_r1910162943

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These points make sense. We can keep it, but I would advocate for half a sentence like "If you haven't done so through the setup wizard, go through the following steps to....". That way people will know not to do the same thing twice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you -- I'll rewrite this section for sure because I now see that it can be misleading!

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another problem: it may not always be localhost:3000 depending on the app

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated this to be more like what we currently have in the wizard

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice rework!

Let's make sure to merge in #12293 before this one and also see if @lforst has any comments here

@inventarSarah
Copy link
Collaborator Author

@lfrost @chargome
For testing purposes, I have updated this quick start guide with some ideas from the team.

This also addresses some of your feedback, so I hope you can find some improvements in these changes too!

What's changed:

  • Step 1 should be Install (the old Step 1 wasn't actionable, which does not make sense for something called "Step" :D)
  • Test: moved the features list into an Expandable in the Install section
  • Test: moved the list in View Captured Data in Sentry into an Expandable
  • Test: moved the Expandable about Turbopack into the Verify section

I like that the guide is more actionable now and that we can still include information without scaring the user with an overly long page (by using the Expandables). However, I feel like there are too many boxes now and that it might not be pleasant to look at.
I need to revisit the page with refreshed eyes later again :)
In the meantime, please have a look if you want, and I will also ask Salma to do the same

Thank you!!

Co-authored-by: Francesco Gringl-Novy <[email protected]>
Copy link
Contributor

@whitep4nth3r whitep4nth3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. I love how the full guide fits completely on my weird vertical type monitor as a bonus. ✅


After the wizard setup is completed, the SDK will automatically capture unhandled errors, and monitor performance.
You can also <PlatformLink to="/usage/">manually capture errors</PlatformLink>.
- [**Error Monitoring**](/product/issues) (always enabled): Automatically report errors,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know Issues is our error monitoring product, but clicking on 'Error Monitoring' and being directed to the 'Issues' page might be confusing for those less familiar with Sentry.

What do you think about having this anchor text say 'issues' and providing some context in the description?

e.g. "Issues (always enabled): Sentry's core error monitoring product that automatically reports errors . . ."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do as you suggested! This is also a good idea because we also write about this "Issues" page under "Need help locating the captured errors in your Sentry project?"

Updated 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/):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about linking to https://sentry-docs-git-smi-quick-startnextjs.sentry.dev/product/explore/session-replay/web/ instead of the /getting-started/ page here? I feel like it provides more context and feels more inline with the content on two links above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good idea!
Updated 👍


</Alert>
- 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`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Add a Next.js instrumentation hook to your project (`instrumentation.ts`)
- Addition of Next.js instrumentation hook to your project (`instrumentation.ts`)

Copy link
Contributor

@coolguyzone coolguyzone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @inventarSarah, this looks great! I added some comments/suggestions, feel free to push back/reject any of them. 🏄‍♂️

Copy link
Contributor

@codyde codyde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! I looked over the other feedback and saw you incorporated it all. This is all good on my side.

LGTM!

@inventarSarah inventarSarah merged commit faf1e71 into master Feb 3, 2025
10 checks passed
@inventarSarah inventarSarah deleted the smi/quick-start/nextjs branch February 3, 2025 07:49
@github-actions github-actions bot locked and limited conversation to collaborators Feb 19, 2025
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.

8 participants