Repository: getsentry/sentry-docs
Pull request #13497: docs(js): Review and update Nest.js Quick Start guide
Author: login: inventarSarah
Created: 2025-04-24T10:03:53Z | Merged: 2025-05-20T09:08:47Z

<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. -->

## DESCRIBE YOUR PR
The Nest.js quick start guide already looked great -> I added and removed some content to be more consistent with our other guides.

I tried to streamline the CommonJS section, as we already have the details on [this page](https://docs.sentry.io/platforms/javascript/guides/nestjs/install/commonjs/) (I added a link to the page). Plus, the content seemed too detailed for a Quick Start guide IMO. 
Naturally, if you say the info I removed is vital for the QS guide, we can add it back in.

Additionally, I expanded the "Verify Your Setup" section so the example provided is like our [Node.js one](https://docs.sentry.io/platforms/javascript/guides/node/#step-4-verify-your-setup).

Closes: #13498


## 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.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] 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](https://github.com/orgs/getsentry/teams/docs)

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)



Diff:
diff --git a/docs/platforms/javascript/guides/nestjs/index.mdx b/docs/platforms/javascript/guides/nestjs/index.mdx
index 44deaaac34090..f3492b692060f 100644
--- a/docs/platforms/javascript/guides/nestjs/index.mdx
+++ b/docs/platforms/javascript/guides/nestjs/index.mdx
@@ -1,6 +1,6 @@
 ---
 title: Nest.js
-description: "Learn about using Sentry with Nest.js."
+description: "Learn how to set up Sentry in your Nest.js app and capture your first errors."
 sdk: sentry.javascript.nestjs
 fallbackGuide: javascript.node
 categories:
@@ -9,6 +9,112 @@ categories:
   - server-node
 ---
 
-This guide explains how to set up Sentry in your Nest.js application.
+<PlatformContent includePath="getting-started-prerequisites" />
 
-<PlatformContent includePath="getting-started-node" />
+## Step 1: Install
+
+Choose the features you want to configure, and this guide will show you how:
+
+<OnboardingOptionButtons
+  options={["error-monitoring", "performance", "profiling"]}
+/>
+
+<PlatformContent includePath="getting-started-features-expandable" />
+
+### Install the Sentry SDK
+
+Run the command for your preferred package manager to add the Sentry SDK to your application:
+
+<PlatformContent includePath="getting-started-install" />
+
+## Step 2: Configure
+
+### Initialize the Sentry SDK
+
+To import and initialize Sentry, create a file named `instrument.ts` in the root directory of your project and add the following code:
+
+<PlatformContent includePath="getting-started-config" />
+
+### Apply Instrumentation to Your App
+
+Make sure to import the `instrument.ts` file before any other modules:
+
+```typescript {filename: main.ts} {1-2}
+// Import this first!
+import "./instrument";
+
+// Now import other modules
+import { NestFactory } from "@nestjs/core";
+import { AppModule } from "./app.module";
+
+async function bootstrap() {
+  const app = await NestFactory.create(AppModule);
+  await app.listen(3000);
+}
+
+bootstrap();
+```
+
+Afterward, add the `SentryModule` as a root module to your main module:
+
+```typescript {filename: app.module.ts} {2, 8}
+import { Module } from "@nestjs/common";
+import { SentryModule } from "@sentry/nestjs/setup";
+import { AppController } from "./app.controller";
+import { AppService } from "./app.service";
+
+@Module({
+  imports: [
+    SentryModule.forRoot(),
+    // ...other modules
+  ],
+  controllers: [AppController],
+  providers: [AppService],
+})
+export class AppModule {}
+```
+
+## Step 3: Capture Nest.js Errors
+
+<PlatformContent includePath="getting-started-capture-errors" />
+
+## Step 4: Add Readable Stack Traces With Source Maps (Optional)
+
+The stack traces in your Sentry errors probably won't look like your actual code. To fix this, upload your source maps to Sentry.
+The easiest way to do this is by using the Sentry Wizard:
+
+```bash
+npx @sentry/wizard@latest -i sourcemaps
+```
+
+## Step 5: Verify Your Setup
+
+Let's test your setup and confirm that Sentry is working correctly and sending data to your Sentry project.
+
+<PlatformContent includePath="getting-started-verify" />
+
+### View Captured Data in Sentry
+
+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).
+
+<PlatformContent includePath="getting-started-verify-locate-data" />
+
+## Next Steps
+
+At this point, you should have integrated Sentry into your Nest.js application and should already be sending 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:
+
+- Extend Sentry to your frontend using one of our [frontend SDKs](/)
+- Learn how to [manually capture errors](/platforms/javascript/guides/nestjs/usage/)
+- Continue to [customize your configuration](/platforms/javascript/guides/nestjs/configuration/)
+- Get familiar with [Sentry's product features](/product) like tracing, insights, and alerts
+
+<Expandable permalink={false} title="Are you having problems setting up the SDK?">
+
+- Check out alternative <PlatformLink to="/install">installation methods</PlatformLink>
+- Find various topics in <PlatformLink to="/troubleshooting">Troubleshooting</PlatformLink>
+- [Get support](https://sentry.zendesk.com/hc/en-us/)
+
+</Expandable>
diff --git a/platform-includes/getting-started-capture-errors/javascript.nestjs.mdx b/platform-includes/getting-started-capture-errors/javascript.nestjs.mdx
new file mode 100644
index 0000000000000..ba28fe3fce957
--- /dev/null
+++ b/platform-includes/getting-started-capture-errors/javascript.nestjs.mdx
@@ -0,0 +1,84 @@
+By default, Sentry only captures unhandled exceptions that aren't caught by an error filter.
+Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) aren't captured by default because they mostly act as control flow vehicles.
+
+To make sure Sentry captures all your app's errors, configure error handling based on how your application manages exceptions:
+
+### Using a Custom Global Filter
+
+If you have a global catch-all exception filter, add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method:
+
+```typescript {2, 6}
+import { Catch, ExceptionFilter } from "@nestjs/common";
+import { SentryExceptionCaptured } from "@sentry/nestjs";
+
+@Catch()
+export class YourCatchAllExceptionFilter implements ExceptionFilter {
+  @SentryExceptionCaptured()
+  catch(exception, host): void {
+    // your implementation here
+  }
+}
+```
+
+### Not Using a Custom Global Filter
+
+If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module, **before** any other exception filters:
+
+```typescript {2-3, 7-10}
+import { Module } from "@nestjs/common";
+import { APP_FILTER } from "@nestjs/core";
+import { SentryGlobalFilter } from "@sentry/nestjs/setup";
+
+@Module({
+  providers: [
+    {
+      provide: APP_FILTER,
+      useClass: SentryGlobalFilter,
+    },
+    // ..other providers
+  ],
+})
+export class AppModule {}
+```
+
+### Using Error Filters for Specific Exception Types
+
+If you have error filters for specific types of exceptions (for example, `@Catch(HttpException)`) and you want to report these errors to Sentry, you need to capture them in the `catch()` handler using `Sentry.captureException()`:
+
+```typescript {4,9}
+import { ArgumentsHost, BadRequestException, Catch } from "@nestjs/common";
+import { BaseExceptionFilter } from "@nestjs/core";
+import { ExampleException } from "./example.exception";
+import * as Sentry from "@sentry/nestjs";
+
+@Catch(ExampleException)
+export class ExampleExceptionFilter extends BaseExceptionFilter {
+  catch(exception: unknown, host: ArgumentsHost) {
+    Sentry.captureException(exception);
+    return super.catch(new BadRequestException(exception.message), host);
+  }
+}
+```
+
+<Expandable title="Are you using Microservices?">
+If you're using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see [Nest.js Microservices documentation](https://docs.nestjs.com/microservices/exception-filters)).
+`SentryGlobalFilter` in a [hybrid application](https://docs.nestjs.com/faq/hybrid-application) doesn't extend `BaseRpcExceptionFilter` since this depends on `@nestjs/microservices`.
+
+Use `Sentry.captureException(exception)` in your custom filter in case you want to send these errors to Sentry:
+
+```typescript
+import { Catch, RpcExceptionFilter, ArgumentsHost } from "@nestjs/common";
+import { Observable, throwError } from "rxjs";
+import { RpcException } from "@nestjs/microservices";
+import * as Sentry from "@sentry/nestjs";
+
+@Catch(RpcException)
+export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
+  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
+    Sentry.captureException(exception); // optional
+    return throwError(() => exception.getError());
+  }
+}
+```
+
+</Expandable>
diff --git a/platform-includes/getting-started-config/javascript.nestjs.mdx b/platform-includes/getting-started-config/javascript.nestjs.mdx
index 432dde267a99f..0ed1b389b40f3 100644
--- a/platform-includes/getting-started-config/javascript.nestjs.mdx
+++ b/platform-includes/getting-started-config/javascript.nestjs.mdx
@@ -1,39 +1,4 @@
-```javascript {tabTitle:ESM} {filename: instrument.mjs}
-import * as Sentry from "@sentry/nestjs";
-// ___PRODUCT_OPTION_START___ profiling
-import { nodeProfilingIntegration } from '@sentry/profiling-node';
-// ___PRODUCT_OPTION_END___ profiling
-
-// Ensure to call this before importing any other modules!
-Sentry.init({
-  dsn: "___PUBLIC_DSN___",
-  
-  // Adds request headers and IP for users, for more info visit:
-  // https://docs.sentry.io/platforms/javascript/guides/nestjs/configuration/options/#sendDefaultPii
-  sendDefaultPii: true,
-  
-  // ___PRODUCT_OPTION_START___ profiling
-  integrations: [
-    // Add our Profiling integration
-    nodeProfilingIntegration(),
-  ],
-  // ___PRODUCT_OPTION_END___ profiling
-  // ___PRODUCT_OPTION_START___ performance
-
-  // Add Tracing by setting tracesSampleRate
-  // We recommend adjusting this value in production
-  tracesSampleRate: 1.0,
-  // ___PRODUCT_OPTION_END___ performance
-  // ___PRODUCT_OPTION_START___ profiling
-
-  // Set sampling rate for profiling
-  // This is relative to tracesSampleRate
-  profilesSampleRate: 1.0,
-  // ___PRODUCT_OPTION_END___ profiling
-});
-```
-
-```javascript {tabTitle:CommonJS} {filename: instrument.js}
+```typescript {filename: instrument.ts}
 const Sentry = require("@sentry/nestjs");
 // ___PRODUCT_OPTION_START___ profiling
 const { nodeProfilingIntegration } = require("@sentry/profiling-node");
@@ -50,16 +15,21 @@ Sentry.init({
   // ___PRODUCT_OPTION_END___ profiling
   // ___PRODUCT_OPTION_START___ performance
 
-  // Add Tracing by setting tracesSampleRate
+  // Set tracesSampleRate to 1.0 to capture 100%
+  // of transactions for tracing.
   // We recommend adjusting this value in production
+  // Learn more at
+  // https://docs.sentry.io/platforms/javascript/guides/nestjs/configuration/options/#tracesSampleRate
   tracesSampleRate: 1.0,
   // ___PRODUCT_OPTION_END___ performance
   // ___PRODUCT_OPTION_START___ profiling
 
-  // Set sampling rate for profiling
+  // Set profilesSampleRate to 1.0 to profile 100%
+  // of sampled transactions.
   // This is relative to tracesSampleRate
+  // Learn more at
+  // https://docs.sentry.io/platforms/javascript/guides/nestjs/configuration/options/#profilesSampleRate
   profilesSampleRate: 1.0,
   // ___PRODUCT_OPTION_END___ profiling
 });
 ```
-
diff --git a/platform-includes/getting-started-node/javascript.mdx b/platform-includes/getting-started-node/javascript.mdx
index 28b9ba96f53f5..1b4fae63214de 100644
--- a/platform-includes/getting-started-node/javascript.mdx
+++ b/platform-includes/getting-started-node/javascript.mdx
@@ -85,6 +85,7 @@ Our next recommended steps for you are:
 <Expandable permalink={false} title="Are you having problems setting up the SDK?">
 
 - Check out alternative <PlatformLink to="/install">installation methods</PlatformLink>
+- Find various topics in <PlatformLink to="/troubleshooting">Troubleshooting</PlatformLink>
 - [Get support](https://sentry.zendesk.com/hc/en-us/)
 
 </Expandable>
diff --git a/platform-includes/getting-started-use/javascript.nestjs.mdx b/platform-includes/getting-started-use/javascript.nestjs.mdx
index e18fc00fb03a2..fa2080009b46e 100644
--- a/platform-includes/getting-started-use/javascript.nestjs.mdx
+++ b/platform-includes/getting-started-use/javascript.nestjs.mdx
@@ -1,4 +1,6 @@
-```javascript {filename: main.ts}
+Make sure to import the `instrument.ts` file before any other modules:
+
+```typescript {filename: main.ts} {1-2}
 // Import this first!
 import "./instrument";
 
@@ -14,9 +16,9 @@ async function bootstrap() {
 bootstrap();
 ```
 
-Afterwards, add the `SentryModule` as a root module to your main module:
+Afterward, add the `SentryModule` as a root module to your main module:
 
-```javascript {filename: app.module.ts} {2, 8}
+```typescript {filename: app.module.ts} {2, 8}
 import { Module } from "@nestjs/common";
 import { SentryModule } from "@sentry/nestjs/setup";
 import { AppController } from "./app.controller";
@@ -33,85 +35,4 @@ import { AppService } from "./app.service";
 export class AppModule {}
 ```
 
-If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
-This decorator will report all unexpected errors that are received by your global error filter to Sentry:
-
-```javascript {2, 6}
-import { Catch, ExceptionFilter } from '@nestjs/common';
-import { SentryExceptionCaptured } from '@sentry/nestjs';
-
-@Catch()
-export class YourCatchAllExceptionFilter implements ExceptionFilter {
-  @SentryExceptionCaptured()
-  catch(exception, host): void {
-    // your implementation here
-  }
-}
-```
-
-By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry.
-`HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles.
-
-If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module.
-This filter will report any unhandled errors that aren't caught by other error filters to Sentry.
-**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.
-
-```javascript {3, 9}
-import { Module } from "@nestjs/common";
-import { APP_FILTER } from "@nestjs/core";
-import { SentryGlobalFilter } from "@sentry/nestjs/setup";
-
-@Module({
-  providers: [
-    {
-      provide: APP_FILTER,
-      useClass: SentryGlobalFilter,
-    },
-    // ..other providers
-  ],
-})
-export class AppModule {}
-```
-
-<Expandable title="Using Microservices?">
-
-If you are using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters). 
-`SentryGlobalFilter` in a [hybrid application](https://docs.nestjs.com/faq/hybrid-application) does not extend `BaseRpcExceptionFilter` since this depends on `@nestjs/microservices`.
-
-Use `Sentry.captureException(exception)` in your custom filter in case you want to send these errors to Sentry:
-
-```typescript
-import { Catch, RpcExceptionFilter, ArgumentsHost } from '@nestjs/common';
-import { Observable, throwError } from 'rxjs';
-import { RpcException } from '@nestjs/microservices';
-import * as Sentry from '@sentry/nestjs';
-
-@Catch(RpcException)
-export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
-  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
-    Sentry.captureException(exception); // optional
-    return throwError(() => exception.getError());
-  }
-}
-```
-
-
-</Expandable>
-
-
-If you have error filters for specific types of exceptions (for example `@Catch(HttpException)`, or any other `@Catch(...)` with arguments) and you want to capture errors caught by these filters, capture the errors in the `catch()` handler with `Sentry.captureException()`:
-
-```javascript {9}
-import { ArgumentsHost, BadRequestException, Catch } from '@nestjs/common';
-import { BaseExceptionFilter } from '@nestjs/core';
-import { ExampleException } from './example.exception';
-import * as Sentry from '@sentry/nestjs';
-
-@Catch(ExampleException)
-export class ExampleExceptionFilter extends BaseExceptionFilter {
-  catch(exception: unknown, host: ArgumentsHost) {
-    Sentry.captureException(exception);
-    return super.catch(new BadRequestException(exception.message), host)
-  }
-}
-```
+<PlatformContent includePath="getting-started-capture-errors" />
diff --git a/platform-includes/getting-started-verify/javascript.nestjs.mdx b/platform-includes/getting-started-verify/javascript.nestjs.mdx
index c1bcc15475103..93618d7e8c77a 100644
--- a/platform-includes/getting-started-verify/javascript.nestjs.mdx
+++ b/platform-includes/getting-started-verify/javascript.nestjs.mdx
@@ -1,6 +1,34 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will trigger an error that Sentry will capture:
+
 ```javascript
 @Get("/debug-sentry")
-getError() {
-  throw new Error("My first Sentry error!");
+  getError() {
+    throw new Error("My first Sentry error!");
+  }
+```
+
+<OnboardingOption optionId="performance">
+### Tracing
+
+To test your tracing configuration, update the previous code snippet by starting a performance trace to measure the time it takes for the execution of your code:
+
+```javascript
+@Get("/debug-sentry")
+  getError() {
+    Sentry.startSpan(
+	  {
+	    op: "test",
+	    name: "My First Test Transaction",
+	  },
+	  () => {
+	    setTimeout(() => {
+	      throw new Error("My first Sentry error!");
+	    }, 99);
+	  },
+	);
 }
 ```
+
+</OnboardingOption>


Reviews:
user: login: inventarSarah
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-24T10:15:22Z
user: login: Lms24
body: This looks good but I think we need to sort out some things:

1. h: we can't include nestjs specific code and instructions in the shared commonjs page
2. m: we should avoid linking to commonJS for the exception filter explanation (or IOW think about where we put this and then link there if applicable)

1 we need to solve in this PR, 2 we can also address in a follow-up.
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-04-25T09:02:33Z
user: login: chargome
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-04-25T11:09:23Z
user: login: inventarSarah
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-28T07:28:23Z
user: login: Lms24
body: Thanks for making the changes and for creating the follow-up issue. 
state: APPROVED
author_association: MEMBER
submitted_at: 2025-04-29T10:27:13Z
user: login: chargome
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-05-06T07:22:23Z
user: login: inventarSarah
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-06T11:42:25Z
user: login: chargome
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-06T12:17:27Z
user: login: inventarSarah
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-08T06:23:43Z
user: login: inventarSarah
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-05-08T06:24:07Z
user: login: chargome
body: @inventarSarah just realized that we have the global error filter sections now twice in the guide!
state: CHANGES_REQUESTED
author_association: MEMBER
submitted_at: 2025-05-15T07:53:47Z
user: login: Lms24
body: All good from my end, will let @chargome give the final approval :) 
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-19T11:29:06Z
user: login: chargome
state: APPROVED
author_association: MEMBER
submitted_at: 2025-05-19T14:21:46Z

Review comments:
diff_hunk: @@ -33,28 +33,15 @@ import { AppService } from "./app.service";
 export class AppModule {}
 ```
 
-If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
-This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry. Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are not captured automatically as they mostly act as control flow vehicles.
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: inventarSarah
body: Here we start with the Error Capturing topic.
I was wondering if it would make sense to not have this in "Apply Instrumentation to Your App" and instead put it in a dedicated section, "Step x: Capture Nest.js Errors" -> similar to [how we have it for React ](https://docs.sentry.io/platforms/javascript/guides/react/#apply-instrumentation-to-your-app).

But then this only seems to be documented for CJS - I was wondering why we don't have this documented for ESM? Or is this not needed/possible? 

I don't see this as part of this PR -- we can address in a future issue/PR.
created_at: 2025-04-24T10:15:22Z
author_association: COLLABORATOR
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: For NestJS-CommmonJS specifically, I don't think we should show ESM/CJS tabs here because later on we instruct users to `import "./instrument"`. Since Nest ships with TS, we can simply let users create an `instrument.ts` file. (cc @chargome - let me know if I'm missing something or this sounds unreasonable to you)

![image](https://github.com/user-attachments/assets/35a8beca-492d-4a0b-ba0d-28a0c174cde7)

I'm realizing that this is a common guide for various node platforms but it's quite confusing for NestJS I'd argue. So maybe it makes sense to create a Nest-specific version of it 🤔 In general, for the common guide, I don't think we should even show the ESM tab on the CommonJS installation page :)

also please see my other comment about nestjs-specific code in this page 
created_at: 2025-04-25T08:26:29Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
+```javascript {filename: main.ts}
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: let's highlight the important part (alternatively, diff is also an option but we're already using highlights in the blocks below)

```suggestion
```javascript {filename: main.ts} {1-2}
```
created_at: 2025-04-25T08:30:05Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
+```javascript {filename: main.ts}
+// Import this first!
+import "./instrument";
+
+// Now import other modules
+import { NestFactory } from "@nestjs/core";
+import { AppModule } from "./app.module";
+
+async function bootstrap() {
+  const app = await NestFactory.create(AppModule);
+  await app.listen(3000);
+}
+
+bootstrap();
+```
+
+Afterwards, add the `SentryModule` as a root module to your main module:
+
+```javascript {filename: app.module.ts} {2, 8}
+import { Module } from "@nestjs/common";
+import { SentryModule } from "@sentry/nestjs/setup";
+import { AppController } from "./app.controller";
+import { AppService } from "./app.service";
+
+@Module({
+  imports: [
+    SentryModule.forRoot(),
+    // ...other modules
+  ],
+  controllers: [AppController],
+  providers: [AppService],
+})
+export class AppModule {}
+```
+
+If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
+This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+
+```javascript {2, 6}
+import { Catch, ExceptionFilter } from '@nestjs/common';
+import { SentryExceptionCaptured } from '@sentry/nestjs';
+
+@Catch()
+export class YourCatchAllExceptionFilter implements ExceptionFilter {
+  @SentryExceptionCaptured()
+  catch(exception, host): void {
+    // your implementation here
+  }
+}
+```
+
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry.
+`HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles.
+
+If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module.
+This filter will report any unhandled errors that aren't caught by other error filters to Sentry.
+**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.
+
+```javascript {3, 9}
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: IMHO we should highlight the entire new provider object, and the `APP_INITIALIZER` import. 

```suggestion
```javascript {2-3, 7-10}
```
created_at: 2025-04-25T08:41:37Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
+```javascript {filename: main.ts}
+// Import this first!
+import "./instrument";
+
+// Now import other modules
+import { NestFactory } from "@nestjs/core";
+import { AppModule } from "./app.module";
+
+async function bootstrap() {
+  const app = await NestFactory.create(AppModule);
+  await app.listen(3000);
+}
+
+bootstrap();
+```
+
+Afterwards, add the `SentryModule` as a root module to your main module:
+
+```javascript {filename: app.module.ts} {2, 8}
+import { Module } from "@nestjs/common";
+import { SentryModule } from "@sentry/nestjs/setup";
+import { AppController } from "./app.controller";
+import { AppService } from "./app.service";
+
+@Module({
+  imports: [
+    SentryModule.forRoot(),
+    // ...other modules
+  ],
+  controllers: [AppController],
+  providers: [AppService],
+})
+export class AppModule {}
+```
+
+If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
+This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+
+```javascript {2, 6}
+import { Catch, ExceptionFilter } from '@nestjs/common';
+import { SentryExceptionCaptured } from '@sentry/nestjs';
+
+@Catch()
+export class YourCatchAllExceptionFilter implements ExceptionFilter {
+  @SentryExceptionCaptured()
+  catch(exception, host): void {
+    // your implementation here
+  }
+}
+```
+
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry.
+`HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles.
+
+If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module.
+This filter will report any unhandled errors that aren't caught by other error filters to Sentry.
+**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.
+
+```javascript {3, 9}
+import { Module } from "@nestjs/common";
+import { APP_FILTER } from "@nestjs/core";
+import { SentryGlobalFilter } from "@sentry/nestjs/setup";
+
+@Module({
+  providers: [
+    {
+      provide: APP_FILTER,
+      useClass: SentryGlobalFilter,
+    },
+    // ..other providers
+  ],
+})
+export class AppModule {}
+```
+
+<Expandable title="Using Microservices?">
+
+If you are using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters).
+`SentryGlobalFilter` in a [hybrid application](https://docs.nestjs.com/faq/hybrid-application) does not extend `BaseRpcExceptionFilter` since this depends on `@nestjs/microservices`.
+
+Use `Sentry.captureException(exception)` in your custom filter in case you want to send these errors to Sentry:
+
+```typescript
+import { Catch, RpcExceptionFilter, ArgumentsHost } from "@nestjs/common";
+import { Observable, throwError } from "rxjs";
+import { RpcException } from "@nestjs/microservices";
+import * as Sentry from "@sentry/nestjs";
+
+@Catch(RpcException)
+export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
+  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
+    Sentry.captureException(exception); // optional
+    return throwError(() => exception.getError());
+  }
+}
+```
+
+</Expandable>
+
+If you have error filters for specific types of exceptions (for example `@Catch(HttpException)`, or any other `@Catch(...)` with arguments) and you want to capture errors caught by these filters, capture the errors in the `catch()` handler with `Sentry.captureException()`:
+
+```javascript {9}
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: ```suggestion
```javascript {4, 9}
```
created_at: 2025-04-25T08:42:49Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
+```javascript {filename: main.ts}
+// Import this first!
+import "./instrument";
+
+// Now import other modules
+import { NestFactory } from "@nestjs/core";
+import { AppModule } from "./app.module";
+
+async function bootstrap() {
+  const app = await NestFactory.create(AppModule);
+  await app.listen(3000);
+}
+
+bootstrap();
+```
+
+Afterwards, add the `SentryModule` as a root module to your main module:
+
+```javascript {filename: app.module.ts} {2, 8}
+import { Module } from "@nestjs/common";
+import { SentryModule } from "@sentry/nestjs/setup";
+import { AppController } from "./app.controller";
+import { AppService } from "./app.service";
+
+@Module({
+  imports: [
+    SentryModule.forRoot(),
+    // ...other modules
+  ],
+  controllers: [AppController],
+  providers: [AppService],
+})
+export class AppModule {}
+```
+
+If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
+This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+
+```javascript {2, 6}
+import { Catch, ExceptionFilter } from '@nestjs/common';
+import { SentryExceptionCaptured } from '@sentry/nestjs';
+
+@Catch()
+export class YourCatchAllExceptionFilter implements ExceptionFilter {
+  @SentryExceptionCaptured()
+  catch(exception, host): void {
+    // your implementation here
+  }
+}
+```
+
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry.
+`HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles.
+
+If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module.
+This filter will report any unhandled errors that aren't caught by other error filters to Sentry.
+**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.
+
+```javascript {3, 9}
+import { Module } from "@nestjs/common";
+import { APP_FILTER } from "@nestjs/core";
+import { SentryGlobalFilter } from "@sentry/nestjs/setup";
+
+@Module({
+  providers: [
+    {
+      provide: APP_FILTER,
+      useClass: SentryGlobalFilter,
+    },
+    // ..other providers
+  ],
+})
+export class AppModule {}
+```
+
+<Expandable title="Using Microservices?">
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: feel free to ignore but was just thinking "using microservices?" might be a bit too informal? again, no strong feelings, so fee free to disregard!

```suggestion
<Expandable title="Are You Using Microservices?">
```
created_at: 2025-04-25T08:44:00Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
+```javascript {filename: main.ts}
+// Import this first!
+import "./instrument";
+
+// Now import other modules
+import { NestFactory } from "@nestjs/core";
+import { AppModule } from "./app.module";
+
+async function bootstrap() {
+  const app = await NestFactory.create(AppModule);
+  await app.listen(3000);
+}
+
+bootstrap();
+```
+
+Afterwards, add the `SentryModule` as a root module to your main module:
+
+```javascript {filename: app.module.ts} {2, 8}
+import { Module } from "@nestjs/common";
+import { SentryModule } from "@sentry/nestjs/setup";
+import { AppController } from "./app.controller";
+import { AppService } from "./app.service";
+
+@Module({
+  imports: [
+    SentryModule.forRoot(),
+    // ...other modules
+  ],
+  controllers: [AppController],
+  providers: [AppService],
+})
+export class AppModule {}
+```
+
+If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
+This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+
+```javascript {2, 6}
+import { Catch, ExceptionFilter } from '@nestjs/common';
+import { SentryExceptionCaptured } from '@sentry/nestjs';
+
+@Catch()
+export class YourCatchAllExceptionFilter implements ExceptionFilter {
+  @SentryExceptionCaptured()
+  catch(exception, host): void {
+    // your implementation here
+  }
+}
+```
+
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry.
+`HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are also not captured by default because they mostly act as control flow vehicles.
+
+If you don't have a global catch-all exception filter, add the `SentryGlobalFilter` to the providers of your main module.
+This filter will report any unhandled errors that aren't caught by other error filters to Sentry.
+**Important:** The `SentryGlobalFilter` needs to be registered before any other exception filters.
+
+```javascript {3, 9}
+import { Module } from "@nestjs/common";
+import { APP_FILTER } from "@nestjs/core";
+import { SentryGlobalFilter } from "@sentry/nestjs/setup";
+
+@Module({
+  providers: [
+    {
+      provide: APP_FILTER,
+      useClass: SentryGlobalFilter,
+    },
+    // ..other providers
+  ],
+})
+export class AppModule {}
+```
+
+<Expandable title="Using Microservices?">
+
+If you are using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters).
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: IIRC we generally prefer "you're" over "you are" (but again, feel free to disregard, no strong opinions) 

```suggestion
If you're using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters).
```
created_at: 2025-04-25T08:45:04Z
author_association: MEMBER
diff_hunk: @@ -27,4 +27,118 @@ You need to create a file named `instrument.js` that imports and initializes Sen
 
 You need to require or import the `instrument.js` file before requiring any other modules in your application. This is necessary to ensure that Sentry can automatically instrument all modules in your application:
 
-<PlatformContent includePath="getting-started-use" />
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: Lms24
body: h: the platform content here is important because this page is shown in various guides/frameworks. Right now, we'd show NestJS specific code in e.g. Node or Hono guides. 

I think we can take two possibe routes:
1. re-add the `PlatformContent`
2. make a dedicated CommonJS page for NestJS (this would play well with the concern I addressed in the file comment above) 
created_at: 2025-04-25T08:51:16Z
author_association: MEMBER
diff_hunk: @@ -33,28 +33,15 @@ import { AppService } from "./app.service";
 export class AppModule {}
 ```
 
-If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
-This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry. Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are not captured automatically as they mostly act as control flow vehicles.
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: Lms24
body: > I was wondering if it would make sense to not have this in "Apply Instrumentation to Your App" and instead put it in a dedicated section, "Step x: Capture Nest.js Errors"

This sounds reasonable to me!

> But then this only seems to be documented for CJS - I was wondering why we don't have this documented for ESM? Or is this not needed/possible?

I think this should be the same for CJS and ESM. Or IOW, the filters require should be applied in the same way regardless of ESM/CJS

> I don't see this as part of this PR -- we can address in a future issue/PR.

that also sounds reasonable :D
created_at: 2025-04-25T08:55:42Z
author_association: MEMBER
diff_hunk: @@ -33,28 +33,15 @@ import { AppService } from "./app.service";
 export class AppModule {}
 ```
 
-If you're using a global catch-all exception filter (which is either a filter registered with `app.useGlobalFilters()` or a filter registered in your app module providers annotated with a `@Catch()` decorator without arguments), add a `@SentryExceptionCaptured()` decorator to the filter's `catch()` method.
-This decorator will report all unexpected errors that are received by your global error filter to Sentry:
+By default, only unhandled exceptions that are not caught by an error filter are reported to Sentry. Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) are not captured automatically as they mostly act as control flow vehicles.
 
-```javascript {2, 6}
-import { Catch, ExceptionFilter } from '@nestjs/common';
-import { SentryExceptionCaptured } from '@sentry/nestjs';
+##### Basic Error Capture
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: Lms24
body: maybe that's me but this sounded off 🤔 

```suggestion
##### Basic Error Capturing
```
created_at: 2025-04-25T08:56:40Z
author_association: MEMBER
diff_hunk: @@ -73,45 +60,6 @@ import { SentryGlobalFilter } from "@sentry/nestjs/setup";
 export class AppModule {}
 ```
 
-<Expandable title="Using Microservices?">
-
-If you are using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters). 
-`SentryGlobalFilter` in a [hybrid application](https://docs.nestjs.com/faq/hybrid-application) does not extend `BaseRpcExceptionFilter` since this depends on `@nestjs/microservices`.
-
-Use `Sentry.captureException(exception)` in your custom filter in case you want to send these errors to Sentry:
-
-```typescript
-import { Catch, RpcExceptionFilter, ArgumentsHost } from '@nestjs/common';
-import { Observable, throwError } from 'rxjs';
-import { RpcException } from '@nestjs/microservices';
-import * as Sentry from '@sentry/nestjs';
-
-@Catch(RpcException)
-export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
-  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
-    Sentry.captureException(exception); // optional
-    return throwError(() => exception.getError());
-  }
-}
-```
-
-
-</Expandable>
-
+##### Fine-Tuning Error Capture
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: Lms24
body: same concern as above (but fee free to disregard)

```suggestion
##### Fine-Tuning Error Capturing
```
created_at: 2025-04-25T08:57:11Z
author_association: MEMBER
diff_hunk: @@ -73,45 +60,6 @@ import { SentryGlobalFilter } from "@sentry/nestjs/setup";
 export class AppModule {}
 ```
 
-<Expandable title="Using Microservices?">
-
-If you are using `@nestjs/microservices` make sure to handle errors in RPC contexts correctly by providing your own `RpcExceptionFilter` (see https://docs.nestjs.com/microservices/exception-filters). 
-`SentryGlobalFilter` in a [hybrid application](https://docs.nestjs.com/faq/hybrid-application) does not extend `BaseRpcExceptionFilter` since this depends on `@nestjs/microservices`.
-
-Use `Sentry.captureException(exception)` in your custom filter in case you want to send these errors to Sentry:
-
-```typescript
-import { Catch, RpcExceptionFilter, ArgumentsHost } from '@nestjs/common';
-import { Observable, throwError } from 'rxjs';
-import { RpcException } from '@nestjs/microservices';
-import * as Sentry from '@sentry/nestjs';
-
-@Catch(RpcException)
-export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
-  catch(exception: RpcException, host: ArgumentsHost): Observable<any> {
-    Sentry.captureException(exception); // optional
-    return throwError(() => exception.getError());
-  }
-}
-```
-
-
-</Expandable>
-
+##### Fine-Tuning Error Capture
 
-If you have error filters for specific types of exceptions (for example `@Catch(HttpException)`, or any other `@Catch(...)` with arguments) and you want to capture errors caught by these filters, capture the errors in the `catch()` handler with `Sentry.captureException()`:
-
-```javascript {9}
-import { ArgumentsHost, BadRequestException, Catch } from '@nestjs/common';
-import { BaseExceptionFilter } from '@nestjs/core';
-import { ExampleException } from './example.exception';
-import * as Sentry from '@sentry/nestjs';
-
-@Catch(ExampleException)
-export class ExampleExceptionFilter extends BaseExceptionFilter {
-  catch(exception: unknown, host: ArgumentsHost) {
-    Sentry.captureException(exception);
-    return super.catch(new BadRequestException(exception.message), host)
-  }
-}
-```
+For more precise control over error reporting in global catch-all exception filters, specific exception filters, or microservices, check out our [CommonJS installation documentation](/platforms/javascript/guides/nestjs/install/commonjs/).
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: Lms24
body: m: I don't think we should link to the CJS guide for this. Either we find a place for it here, or we do something like we have in Angular or React where we explain the intricacies of the filters in a "NestJS Features -> Exception Filters" page. wdyt?
created_at: 2025-04-25T08:58:34Z
author_association: MEMBER
diff_hunk: @@ -1,6 +1,44 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will call an undefined function, triggering an error that Sentry will capture:
+
 ```javascript
 @Get("/debug-sentry")
-getError() {
-  throw new Error("My first Sentry error!");
+  getError() {
+    setTimeout(() => {
path: platform-includes/getting-started-verify/javascript.nestjs.mdx
user: login: Lms24
body: q: why is the timeout necessary?  
created_at: 2025-04-25T08:59:23Z
author_association: MEMBER
diff_hunk: @@ -1,6 +1,44 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will call an undefined function, triggering an error that Sentry will capture:
+
 ```javascript
 @Get("/debug-sentry")
-getError() {
-  throw new Error("My first Sentry error!");
+  getError() {
+    setTimeout(() => {
+      try {
+        foo();
+      } catch (e) {
+        Sentry.captureException(e);
+      }
+    }, 99);
+  }
+```
+
+<OnboardingOption optionId="performance">
+### Tracing
+
+To test your tracing configuration, update the previous code snippet by starting a performance trace to measure the time it takes for the execution of your code:
+
+```javascript
+@Get("/debug-sentry")
+  getError() {
+    Sentry.startSpan(
+	  {
+	    op: "test",
+	    name: "My First Test Transaction",
+	  },
+	  () => {
+	    setTimeout(() => {
path: platform-includes/getting-started-verify/javascript.nestjs.mdx
user: login: Lms24
body: ah, I guess here the timeout makes sense to have a bit of a longer span, but above I don't think we need it
created_at: 2025-04-25T08:59:42Z
author_association: MEMBER
path: docs/platforms/javascript/common/install/commonjs.mdx
user: login: chargome
body: Yeah sounds reasonable to just use a ts file here 👍 
created_at: 2025-04-25T11:09:22Z
author_association: MEMBER
diff_hunk: @@ -1,6 +1,44 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will call an undefined function, triggering an error that Sentry will capture:
+
 ```javascript
 @Get("/debug-sentry")
-getError() {
-  throw new Error("My first Sentry error!");
+  getError() {
+    setTimeout(() => {
path: platform-includes/getting-started-verify/javascript.nestjs.mdx
user: login: inventarSarah
body: you're right - this isn't needed here 👍
created_at: 2025-04-28T07:28:23Z
author_association: COLLABORATOR
diff_hunk: @@ -95,13 +99,11 @@ export class ExceptionFilter implements RpcExceptionFilter<RpcException> {
 }
 ```
 
-
 </Expandable>
 
-
 If you have error filters for specific types of exceptions (for example `@Catch(HttpException)`, or any other `@Catch(...)` with arguments) and you want to capture errors caught by these filters, capture the errors in the `catch()` handler with `Sentry.captureException()`:
 
-```javascript {9}
+```javascript {4-9}
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: Lms24
body: ```suggestion
```javascript {4,9}
```
created_at: 2025-04-29T10:15:09Z
author_association: MEMBER
diff_hunk: @@ -1,6 +1,42 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will call an undefined function, triggering an error that Sentry will capture:
path: platform-includes/getting-started-verify/javascript.nestjs.mdx
user: login: chargome
body: This won't work in a standard nest setup, since typescript transpilation will fail!
created_at: 2025-04-30T10:07:10Z
author_association: MEMBER
diff_hunk: @@ -1,6 +1,42 @@
+### Issues
+
+First, let's verify that Sentry captures errors and creates issues in your Sentry project. Add the following route to your application, which will call an undefined function, triggering an error that Sentry will capture:
path: platform-includes/getting-started-verify/javascript.nestjs.mdx
user: login: inventarSarah
body: Updated the examples -> hope this looks good now!
created_at: 2025-05-06T11:42:25Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,84 @@
+By default, Sentry only captures unhandled exceptions that aren't caught by an error filter.
+Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) aren't captured by default because they mostly act as control flow vehicles.
+
+To make sure Sentry captures all your app's errors, configure error handling based on how your application manages exceptions:
+
+### Using a Global Catch-All Exception Filter
path: platform-includes/getting-started-capture-errors/javascript.nestjs.mdx
user: login: chargome
body: This I would rather name something like "using a custom global filter" – and update the section below accordingly
created_at: 2025-05-06T12:15:13Z
author_association: MEMBER
diff_hunk: @@ -14,9 +16,9 @@ async function bootstrap() {
 bootstrap();
 ```
 
-Afterwards, add the `SentryModule` as a root module to your main module:
+Afterward, add the `SentryModule` as a root module to your main module:
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: chargome
body: ```suggestion
Afterwards, add the `SentryModule` as a root module to your main module:
```
I think? 😅 
created_at: 2025-05-06T12:16:51Z
author_association: MEMBER
diff_hunk: @@ -14,9 +16,9 @@ async function bootstrap() {
 bootstrap();
 ```
 
-Afterwards, add the `SentryModule` as a root module to your main module:
+Afterward, add the `SentryModule` as a root module to your main module:
path: platform-includes/getting-started-use/javascript.nestjs.mdx
user: login: inventarSarah
body: Both forms are correct, although the variant with “s” is used in British English and the one without in American English 👍
created_at: 2025-05-08T06:23:42Z
author_association: COLLABORATOR
diff_hunk: @@ -0,0 +1,84 @@
+By default, Sentry only captures unhandled exceptions that aren't caught by an error filter.
+Additionally, `HttpException`s (including [derivatives](https://docs.nestjs.com/exception-filters#built-in-http-exceptions)) aren't captured by default because they mostly act as control flow vehicles.
+
+To make sure Sentry captures all your app's errors, configure error handling based on how your application manages exceptions:
+
+### Using a Global Catch-All Exception Filter
path: platform-includes/getting-started-capture-errors/javascript.nestjs.mdx
user: login: inventarSarah
body: Updated the subheading to

Using a Custom Global Filter
and
Not Using a Custom Global Filter
created_at: 2025-05-08T06:24:07Z
author_association: COLLABORATOR

PR comments:
user: login: vercel[bot]
created_at: 2025-04-24T10:03:57Z
body: [vc]: #dtmSW/umKJUSwKGlspYg0yuE4Ftx4A/3dE7AAt9rmZ0=:eyJpc01vbm9yZXBvIjp0cnVlLCJ0eXBlIjoiZ2l0aHViIiwicHJvamVjdHMiOlt7Im5hbWUiOiJzZW50cnktZG9jcyIsInJvb3REaXJlY3RvcnkiOm51bGwsImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9zZW50cnkvc2VudHJ5LWRvY3MvSjQ2ZE1wN0VIYXBrWnl0aGVMTGtTbjVvMVl0NyIsInByZXZpZXdVcmwiOiJzZW50cnktZG9jcy1naXQtc21pLXF1aWNrLXN0YXJ0cmV2aWV3LW5lc3Rqcy5zZW50cnkuZGV2IiwibmV4dENvbW1pdFN0YXR1cyI6IkRFUExPWUVEIiwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6InNlbnRyeS1kb2NzLWdpdC1zbWktcXVpY2stc3RhcnRyZXZpZXctbmVzdGpzLnNlbnRyeS5kZXYifX0seyJuYW1lIjoiZGV2ZWxvcC1kb2NzIiwicm9vdERpcmVjdG9yeSI6bnVsbCwibGl2ZUZlZWRiYWNrIjp7InJlc29sdmVkIjowLCJ1bnJlc29sdmVkIjowLCJ0b3RhbCI6MCwibGluayI6IiJ9LCJpbnNwZWN0b3JVcmwiOiJodHRwczovL3ZlcmNlbC5jb20vc2VudHJ5L2RldmVsb3AtZG9jcy83elp1dTk4dlU2SmRjWkF2cVE4Q0NKc2NkSlVGIiwibmV4dENvbW1pdFN0YXR1cyI6IklHTk9SRUQiLCJwcmV2aWV3VXJsIjoiZGV2ZWxvcC1kb2NzLWdpdC1zbWktcXVpY2stc3RhcnRyZXZpZXctbmVzdGpzLnNlbnRyeS5kZXYifSx7Im5hbWUiOiJjaGFuZ2Vsb2ciLCJyb290RGlyZWN0b3J5IjoiYXBwcy9jaGFuZ2Vsb2ciLCJsaXZlRmVlZGJhY2siOnsicmVzb2x2ZWQiOjAsInVucmVzb2x2ZWQiOjAsInRvdGFsIjowLCJsaW5rIjoiIn0sImluc3BlY3RvclVybCI6Imh0dHBzOi8vdmVyY2VsLmNvbS9zZW50cnkvY2hhbmdlbG9nLzNzY3dSdFlqQWg3cXBSVnpFa2loWmlVMXZSVWEiLCJuZXh0Q29tbWl0U3RhdHVzIjoiSUdOT1JFRCIsInByZXZpZXdVcmwiOiJjaGFuZ2Vsb2ctZ2l0LXNtaS1xdWljay1zdGFydHJldmlldy1uZXN0anMuc2VudHJ5LmRldiJ9XX0=
**The latest updates on your projects**. Learn more about [Vercel for Git ↗︎](https://vercel.link/github-learn-more)

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **sentry-docs** | ✅ Ready ([Inspect](https://vercel.com/sentry/sentry-docs/J46dMp7EHapkZytheLLkSn5o1Yt7)) | [Visit Preview](https://sentry-docs-git-smi-quick-startreview-nestjs.sentry.dev) | 💬 [**Add feedback**](https://vercel.live/open-feedback/sentry-docs-git-smi-quick-startreview-nestjs.sentry.dev?via=pr-comment-feedback-link) | May 15, 2025 0:26am |

<details><summary>2 Skipped Deployments</summary>

| Name | Status | Preview | Comments | Updated (UTC) |
| :--- | :----- | :------ | :------- | :------ |
| **changelog** | ⬜️ Ignored ([Inspect](https://vercel.com/sentry/changelog/3scwRtYjAh7qpRVzEkihZiU1vRUa)) | [Visit Preview](https://changelog-git-smi-quick-startreview-nestjs.sentry.dev) |  | May 15, 2025 0:26am |
| **develop-docs** | ⬜️ Ignored ([Inspect](https://vercel.com/sentry/develop-docs/7zZuu98vU6JdcZAvqQ8CCJscdJUF)) | [Visit Preview](https://develop-docs-git-smi-quick-startreview-nestjs.sentry.dev) |  | May 15, 2025 0:26am |
</details>




author_association: NONE
user: login: codecov[bot]
created_at: 2025-04-28T08:24:32Z
body: ## [Bundle](https://app.codecov.io/gh/getsentry/sentry-docs/pull/13497?dropdown=bundle) Report

Changes will increase total bundle size by 240 bytes (0.0%) :arrow_up:. This is within the [configured](https://docs.codecov.com/docs/javascript-bundle-analysis#main-features) threshold :white_check_mark:

<details><summary>Detailed changes</summary>

| Bundle name | Size | Change |
| ----------- | ---- | ------ |
| sentry-docs-server-cjs | 11.2MB | 246 bytes (0.0%) :arrow_up: |
| sentry-docs-client-array-push | 9.51MB | -6 bytes (-0.0%) :arrow_down: |

</details>

### Affected Assets, Files, and Routes:

<details>
<summary>view changes for bundle: sentry-docs-server-cjs</summary>

#### **Assets Changed:**
| Asset Name | Size Change | Total Size | Change (%) |
| ---------- | ----------- | ---------- | ---------- |
| ```1729.js``` | -3 bytes | 1.75MB | -0.0%  |
| ```../instrumentation.js``` | -3 bytes | 1.08MB | -0.0%  |
| ```9523.js``` | -3 bytes | 1.05MB | -0.0%  |
| ```../app/[[...path]]/page.js.nft.json``` | 85 bytes | 396.51kB | 0.02%  |
| ```../app/platform-redirect/page.js.nft.json``` | 85 bytes | 396.43kB | 0.02%  |
| ```../app/sitemap.xml/route.js.nft.json``` | 85 bytes | 394.4kB | 0.02%  |
















</details>

<details>
<summary>view changes for bundle: sentry-docs-client-array-push</summary>

#### **Assets Changed:**
| Asset Name | Size Change | Total Size | Change (%) |
| ---------- | ----------- | ---------- | ---------- |
| ```static/chunks/pages/_app-*.js``` | -3 bytes | 868.7kB | -0.0%  |
| ```static/chunks/8165-*.js``` | -3 bytes | 410.1kB | -0.0%  |
| **```static/A6KS4ZhyNgqH41R14Mfav/_buildManifest.js```** _(New)_ | 578 bytes | 578 bytes | 100.0% :rocket: |
| **```static/A6KS4ZhyNgqH41R14Mfav/_ssgManifest.js```** _(New)_ | 77 bytes | 77 bytes | 100.0% :rocket: |
| ~~**```static/XNLYCqEJQahnoiFGvzySl/_buildManifest.js```**~~ _(Deleted)_ | -578 bytes | 0 bytes | -100.0% :wastebasket: |
| ~~**```static/XNLYCqEJQahnoiFGvzySl/_ssgManifest.js```**~~ _(Deleted)_ | -77 bytes | 0 bytes | -100.0% :wastebasket: |
















</details>

author_association: NONE
user: login: inventarSarah
created_at: 2025-04-28T09:02:38Z
body: Thanks @Lms24 ! 

> 1. h: we can't include nestjs specific code and instructions in the shared commonjs page
> 2. m: we should avoid linking to commonJS for the exception filter explanation (or IOW think about where we put this and then link there if applicable)

I restored the previous content of the commonjs and getting-started-use/nestjs pages. So, now the Nest.js specific info shouldn't surface on other platforms anymore -- lmk if I missed something 🙏 (I think this is the most complex structure I've worked with so far :D)

This way, we can keep this PR focused and small and tackle other issues in a new PR. -> I already created an issue here https://github.com/getsentry/sentry-docs/issues/13525
Please review and comment if you have any suggestions.





author_association: COLLABORATOR
user: login: inventarSarah
created_at: 2025-05-06T11:53:42Z
body: New updates in this PR, @chargome @Lms24 
- guide no longer inherits content from getting-started-node
- updated code snippets to Typescript (remove ESM tabs)
- created new step "Capturing Nest.js Errors" and moved content about exception filters there
- created a new include file for the exception filter content so I could use it in the quick start guide and the CommonJS page -> once the CommonJS page is updated, we can use the content from the include file directly in the QS guide and delete the include file
- removed "ESM" subsection in "Configure" 
author_association: COLLABORATOR
user: login: inventarSarah
created_at: 2025-05-15T08:53:30Z
body: > @inventarSarah just realized that we have the global error filter sections now twice in the guide!

Fixed -> things got crazy with the includes!

Quick Start guide and CommonJS installation method page (which used the same includes) look okay to me now
author_association: COLLABORATOR
user: login: chargome
created_at: 2025-05-15T11:18:12Z
body: seems to be stuck, can you re-trigger a deployment?
author_association: MEMBER
user: login: inventarSarah
created_at: 2025-05-15T12:30:40Z
body: 
> seems to be stuck, can you re-trigger a deployment?
@chargome now everything has worked out

author_association: COLLABORATOR