Skip to content

Nest.js: Rework installation method & exception filter documentation #13525

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

Open
inventarSarah opened this issue Apr 28, 2025 · 4 comments · May be fixed by #13765
Open

Nest.js: Rework installation method & exception filter documentation #13525

inventarSarah opened this issue Apr 28, 2025 · 4 comments · May be fixed by #13765

Comments

@inventarSarah
Copy link
Collaborator

inventarSarah commented Apr 28, 2025

SDK

JavaScript SDK

Description

Let's rework the shared content on installing Sentry for Nest.js and Nest.js-specific error capturing (exception filters).

We have this longer content here: https://docs.sentry.io/platforms/javascript/guides/nestjs/install/commonjs/
which is also used in the quick start guide here: https://docs.sentry.io/platforms/javascript/guides/nestjs/

Goals:

  1. avoid structuring content underneath a "CommonJS" titled section when it's also valid for "ESM" and vice versa
  2. move content that is not needed for installation to a separate page
    a. @Lms24 suggests we could create a "NestJS Features -> Exception Filters" page
  3. show TS file tab instead of ESM/CJS for NestJS-CommmonJS (see comment here)
    a. some code blocks are marked as being Javascript although they are Typescript
  4. QS guide: update "Step 2: Configure" accordingly (this should only include the most important steps)
    a. consider creating a dedicated section "Step x: Capture Nest.js Errors" if needed

This will help make the documentation clearer and help users find the information they need more easily. Additionally, the quick start guide will benefit from the streamlined content.

Related: #13497

Suggested Solution

@Lms24 @chargome @mydea

Please comment if you can think of additional requirements or have other input!

@Lms24
Copy link
Member

Lms24 commented Apr 29, 2025

This sounds reasonable to me! Thanks for extracting my comments into an actionable issue :D

@inventarSarah
Copy link
Collaborator Author

Next Steps

1. Nest.js Quick Start guide:

  • update code snippets to only be TypeScript
  • create a new Step "Capturing Nest.js Errors" and move the exception filter content there

Note: To help with the maintainability of these changes, I updated the Nest.js's quick start guide to no longer inherit content from getting-started-node. Quick Start guide content is now in docs/platforms/javascript/guides/nestjs/index.mdx

-> see PR #13497

2. Installation Methods

  • the CommonJS guide can link to the quick start guide (note: content currently comes from a shared CommonJS page (node?))
  • review and update information on other subpages to make sure it's correct (especially content that's inherited from Node pages)

I'm already working on 1)

How do you think we should proceed with 2)?
Would you have time to review these pages (we can also do it together -- I'm not sure what's more efficient)?

@chargome
Copy link
Member

@inventarSarah

How do you think we should proceed with 2)?

  • Agree we can link to quick start from the CommonJS page
  • The ESM pages (snippets) just need to be adjusted to Nest

@Lms24
Copy link
Member

Lms24 commented May 19, 2025

I agree with Charly

Agree we can link to quick start from the CommonJS page

we can just create the nest specific version that links to QS (and doesn't show much more, if anything)

The ESM pages (snippets) just need to be adjusted to Nest

+1 -- we can either duplicate the pages for Nest or adjust the code snippets. No strong opinions.

One more thing: I'd probably also slightly adjust the "How to Decide Which Instal. Method to use" section and mention NestJS. For example, add a subsection that reads something like:

My application is a simple/default NestJS app

By default, NestJS transpiles to CJS, so you should follow the CJS instructions. Keep reading if you have a more customized application or build setup.

@inventarSarah inventarSarah linked a pull request May 20, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants