nest-raven icon indicating copy to clipboard operation
nest-raven copied to clipboard

Issue in Nest-raven v8 / NestJS v8

Open Sagaryal opened this issue 3 years ago • 0 comments

Currently, my package.json is

    "@nestjs/common": "^8.0.6",
    "@nestjs/core": "^8.0.6",
    "@nestjs/jwt": "^8.0.0",
    "@nestjs/microservices": "^8.0.6",
    "@nestjs/platform-express": "^8.0.6",
    "@sentry/node": "^6.16.1",
    "@sentry/tracing": "^6.16.1",
    "nest-raven": "^8.0.0",

And I have configured it like this in main.ts

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

  Sentry.init({
    dsn: 'my_dsn',

    // Set tracesSampleRate to 1.0 to capture 100%
    // of transactions for performance monitoring.
    // We recommend adjusting this value in production
    tracesSampleRate: 0.05,
  });

  app.useGlobalInterceptors(new RavenInterceptor());
  ......
}
bootstrap();

P.S Also I have tried implementing in app.module like:

@Module({
  imports: [OtherModule, RavenModule],
  providers: [
    {
      provide: APP_INTERCEPTOR,
      useValue: new RavenInterceptor(),
    },
  ],
})
export class AppModule {}

And I threw an error/exception manually but that error is not being reported to Sentry. Same method is working in another project using NestJS v7.5 and nest-raven v7.2. What is the issue actually?

Sagaryal avatar Dec 24 '21 11:12 Sagaryal