You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> info **Hint** we support `yarn` and `pnpm` as well. @sentry/profiling-node is optional, but recommended for performance profiling.
13
14
14
15
15
16
#### Basic Setup
16
17
17
18
To get started with Sentry, you'll need to create an initialization file (e.g., `sentry.init.ts`) that should be imported before any other modules in your application:
> info **Hint***Running with ESM*: If you run your application with ESM, you'll need to import the Sentry Initialization file before importing any other modules. Read about [running Sentry with ESM](https://docs.sentry.io/platforms/javascript/guides/nestjs/install/esm/). If you're not sure about how you're running your application, see [Installation Methods](https://docs.sentry.io/platforms/javascript/guides/nestjs/install/) for more information.
73
92
74
-
#### Exception Handling
75
-
76
-
To ensure Sentry captures unhandled exceptions, you can add the SentryGlobalFilter to your application module:
To verify your Sentry integration is working, you can add a test endpoint that throws an error:
113
108
114
109
```typescript
115
-
import { Controller, Get } from'@nestjs/common';
116
-
@Controller()
117
-
exportclassAppController {
118
-
@Get('debug-sentry')
119
-
testSentry() {
120
-
thrownewError('Test Sentry Integration!');
110
+
@Get("/debug-sentry")
111
+
getError() {
112
+
thrownewError("My first Sentry error!");
121
113
}
122
-
}
123
-
```
124
114
115
+
```
125
116
126
117
Visit `/debug-sentry` in your application, and you should see the error appear in your Sentry dashboard.
127
118
128
-
> info **Hint** For complete documentation about Sentry's NestJS integration, including advanced configuration options and features, visit the [official Sentry documentation](https://docs.sentry.io/platforms/javascript/guides/nestjs/).
129
119
120
+
### Summary
121
+
122
+
For complete documentation about Sentry's NestJS SDK, including advanced configuration options and features, visit the [official Sentry documentation](https://docs.sentry.io/platforms/javascript/guides/nestjs/).
123
+
124
+
While software bugs are Sentry's thing, we still write them. If you come across any problems while installing our SDK, please open a [GitHub Issue](https://github.com/getsentry/sentry-javascript/issues) or reach out on [Discord](https://discord.com/invite/sentry).
0 commit comments