Upgrade sentry (#7145)

Upgrave Sentry to v8 and add Sentry Cron monitoring

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Félix Malfait
2024-09-19 18:09:24 +02:00
committed by GitHub
parent b3ed6cb903
commit 3025ac346c
22 changed files with 879 additions and 210 deletions

View File

@ -3,13 +3,12 @@ import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import * as Sentry from '@sentry/node';
import '@sentry/tracing';
import bytes from 'bytes';
import { useContainer } from 'class-validator';
import { graphqlUploadExpress } from 'graphql-upload';
import { ApplyCorsToExceptions } from 'src/utils/apply-cors-to-exceptions';
import { LoggerService } from 'src/engine/core-modules/logger/logger.service';
import { ApplyCorsToExceptions } from 'src/utils/apply-cors-to-exceptions';
import { AppModule } from './app.module';
@ -36,8 +35,7 @@ const bootstrap = async () => {
app.useLogger(logger);
if (Sentry.isInitialized()) {
app.use(Sentry.Handlers.requestHandler());
app.use(Sentry.Handlers.tracingHandler());
Sentry.setupExpressErrorHandler(app);
}
app.useGlobalFilters(new ApplyCorsToExceptions());