remove sentry integration, fix linting issues

This commit is contained in:
Amruth Pillai
2024-05-20 17:13:17 +02:00
parent 0ee0b6b2e9
commit 09ebcdf40f
30 changed files with 737 additions and 736 deletions

View File

@ -45,9 +45,6 @@ export const configSchema = z.object({
.default("false")
.transform((s) => s !== "false" && s !== "0"),
// Sentry
SERVER_SENTRY_DSN: z.string().url().startsWith("https://").optional(),
// Crowdin (Optional)
CROWDIN_PROJECT_ID: z.coerce.number().optional(),
CROWDIN_PERSONAL_TOKEN: z.string().optional(),

View File

@ -3,10 +3,8 @@ import { ConfigService } from "@nestjs/config";
import { NestFactory } from "@nestjs/core";
import { NestExpressApplication } from "@nestjs/platform-express";
import { DocumentBuilder, SwaggerModule } from "@nestjs/swagger";
import * as Sentry from "@sentry/node";
import cookieParser from "cookie-parser";
import helmet from "helmet";
import { PrismaService } from "nestjs-prisma";
import { patchNestJsSwagger } from "nestjs-zod";
import { AppModule } from "./app.module";
@ -19,27 +17,6 @@ async function bootstrap() {
logger: process.env.NODE_ENV === "development" ? ["debug"] : ["error", "warn", "log"],
});
const configService = app.get(ConfigService<Config>);
const prisma = app.get(PrismaService);
// Sentry
// Error Reporting and Performance Monitoring
const sentryDsn = configService.get("SERVER_SENTRY_DSN");
if (sentryDsn) {
const express = app.getHttpAdapter().getInstance();
Sentry.init({
dsn: sentryDsn,
tracesSampleRate: 1,
profilesSampleRate: 1,
integrations: [
new Sentry.Integrations.Http({ tracing: true }),
new Sentry.Integrations.Express({ app: express }),
new Sentry.Integrations.Prisma({ client: prisma }),
...Sentry.autoDiscoverNodePerformanceMonitoringIntegrations(),
],
});
}
// Cookie Parser
app.use(cookieParser());