Skip to content

Commit

Permalink
refactor: sentry 버전 변경 사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
kimyu0218 committed May 16, 2024
1 parent 8a4dfa1 commit 0f97351
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions backend/was/src/common/config/sentry.setting.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { INestApplication } from '@nestjs/common/interfaces/nest-application.interface';
import * as Sentry from '@sentry/node';
import { ProfilingIntegration } from '@sentry/profiling-node';
import { nodeProfilingIntegration } from '@sentry/profiling-node';

export function setupSentry(app: INestApplication, dsn: string): void {
Sentry.init({
dsn: dsn,
integrations: [new ProfilingIntegration()],
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 0.3,
profilesSampleRate: 0.3,
});

app.use(Sentry.Handlers.errorHandler());
app.use(Sentry.Handlers.tracingHandler());
app.use(Sentry.Handlers.requestHandler());
Sentry.setupExpressErrorHandler(app);
}

0 comments on commit 0f97351

Please sign in to comment.