feat: sentry

This commit is contained in:
Philipinho 2025-02-26 15:16:24 +00:00
parent 7d034e8a8b
commit d51342f7b0
6 changed files with 24 additions and 0 deletions

View File

@ -49,6 +49,8 @@
"@nestjs/websockets": "^11.0.10",
"@react-email/components": "0.0.28",
"@react-email/render": "1.0.2",
"@sentry/nestjs": "^9.2.0",
"@sentry/profiling-node": "^9.2.0",
"@socket.io/redis-adapter": "^8.3.0",
"bcrypt": "^5.1.1",
"bullmq": "^5.41.3",

View File

@ -14,9 +14,11 @@ import { EventEmitterModule } from '@nestjs/event-emitter';
import { HealthModule } from './integrations/health/health.module';
import { ExportModule } from './integrations/export/export.module';
import { ImportModule } from './integrations/import/import.module';
import { SentryModule } from "@sentry/nestjs/setup";
@Module({
imports: [
SentryModule.forRoot(),
CoreModule,
DatabaseModule,
EnvironmentModule,

View File

@ -8,9 +8,11 @@ import { QueueModule } from '../../integrations/queue/queue.module';
import { EventEmitterModule } from '@nestjs/event-emitter';
import { HealthModule } from '../../integrations/health/health.module';
import { CollaborationController } from './collaboration.controller';
import { SentryModule } from "@sentry/nestjs/setup";
@Module({
imports: [
SentryModule.forRoot(),
DatabaseModule,
EnvironmentModule,
CollaborationModule,

View File

@ -1,3 +1,4 @@
import "./common/sentry/instrument";
import { NestFactory } from '@nestjs/core';
import { CollabAppModule } from './collab-app.module';
import {

View File

@ -0,0 +1,16 @@
import * as Sentry from '@sentry/nestjs';
import { nodeProfilingIntegration } from '@sentry/profiling-node';
import { envPath } from '../helpers';
import * as dotenv from 'dotenv';
dotenv.config({ path: envPath });
if (process.env.SENTRY_DSN) {
Sentry.init({
dsn: process.env.SENTRY_DSN,
integrations: [
nodeProfilingIntegration(),
],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0,
});
}

View File

@ -1,3 +1,4 @@
import "./common/sentry/instrument";
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import {