-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
getsentry/sentry-docs
#11830Closed
Copy link
Labels
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/nestjs
SDK Version
8.38.0
Framework Version
nestjs 10.4.1
Link to Sentry event
No response
Reproduction Example/SDK Setup
instrument.ts:
import * as Sentry from '@sentry/nestjs';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import * as process from 'node:process';
Sentry.init({
// We cant use the config service here, because we need to initialize Sentry before the app starts
dsn: process.env.SENTRY_DSN,
integrations: [nodeProfilingIntegration()],
// Tracing
tracesSampleRate: +process.env.SENTRY_TRACES_SAMPLE_RATE || 0.1, // Capture 100% of the transactions
// Set sampling rate for profiling - this is relative to tracesSampleRate
profilesSampleRate: +process.env.PROFILES_SAMPLE_RATE || 0.1,
environment: process.env.SENTRY_ENVIRONMENT,
});
app.module.ts:
@Module({
imports: [
SentryModule.forRoot(),
],
providers: [
{
provide: APP_FILTER,
useClass: SentryGlobalGraphQLFilter,
},
],
})
Steps to Reproduce
- Create a nestjs + graphql application
- Install sentry
- Setup sentry like it is shown in the docs
- Start the application
- Call a url like /fav.ico which does not exist
- The application crashes
Expected Result
The application should not crash
Actual Result
The application crashes. It does not exit, but no request can be made, and the application is not responding.
2024-11-15T06:30:28.009579112Z [2024-11-15T06:30:28.007Z] ERROR NotFoundException: Cannot GET /favicon.ico
2024-11-15T06:30:28.009619610Z at callback (/usr/src/<application>/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_gwypgs4obw5tw3bpishsnyaznu/node_modules/@nestjs/core/router/routes-resolver.js:77:19)
2024-11-15T06:30:28.009623899Z at /usr/src/<application>/node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected]_refl_gwypgs4obw5tw3bpishsnyaznu/node_modules/@nestjs/core/router/router-proxy.js:9:23
2024-11-15T06:30:28.009627495Z at Layer.handle [as handle_request] (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/layer.js:95:5)
2024-11-15T06:30:28.009630892Z at trim_prefix (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:328:13)
2024-11-15T06:30:28.009634259Z at /usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:286:9
2024-11-15T06:30:28.009637755Z at Function.process_params (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:346:12)
2024-11-15T06:30:28.009640951Z at next (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:280:10)
2024-11-15T06:30:28.009643907Z at urlencodedParser (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/body-parser/lib/types/urlencoded.js:91:7)
2024-11-15T06:30:28.009647093Z at Layer.handle [as handle_request] (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/layer.js:95:5)
2024-11-15T06:30:28.009650209Z at trim_prefix (/usr/src/<application>/node_modules/.pnpm/[email protected]/node_modules/express/lib/router/index.js:328:13)
Metadata
Metadata
Assignees
Labels
Projects
Status
No status