chore: disable sentry on backend

This commit is contained in:
Rotimi Best
2024-11-02 17:22:15 +01:00
parent c9271a11ce
commit adb8173869
2 changed files with 8243 additions and 10389 deletions
+11 -11
View File
@@ -4,8 +4,8 @@ const express = require('express');
const rateLimit = require('express-rate-limit');
const cors = require('cors');
const bodyParser = require('body-parser');
const sentry = require('@sentry/node');
const { ProfilingIntegration } = require('@sentry/profiling-node');
// const sentry = require('@sentry/node');
// const { ProfilingIntegration } = require('@sentry/profiling-node');
const uploadVideo = require('./src/routes/uploadVideo');
const downloadCertificate = require('./src/routes/downloadCertificate');
@@ -14,12 +14,12 @@ const downloadCourse = require('./src/routes/downloadCourse');
const katex = require('./src/routes/katex');
const sendEmail = require('./src/routes/sendEmail');
sentry.init({
dsn: process.env.SENTRY_DNS || '',
integrations: [new ProfilingIntegration()],
tracesSampleRate: 1.0,
profilesSampleRate: 1.0
});
// sentry.init({
// dsn: process.env.SENTRY_DNS || '',
// integrations: [new ProfilingIntegration()],
// tracesSampleRate: 1.0,
// profilesSampleRate: 1.0
// });
// Express server
const app = express();
@@ -38,8 +38,8 @@ const limiter = rateLimit({
app.use(limiter);
// Integrate Sentry middleware
app.use(sentry.Handlers.requestHandler());
app.use(sentry.Handlers.errorHandler());
// app.use(sentry.Handlers.requestHandler());
// app.use(sentry.Handlers.errorHandler());
// Register routes
app.use('/downloadCertificate', downloadCertificate);
@@ -68,7 +68,7 @@ app.use((error, req, res, next) => {
console.error('Exception error caught:', error);
// Capture and send the error to Sentry
sentry.captureException(error);
// sentry.captureException(error);
// Respond with a 500 Internal Server Error
res.status(500).json({ error: 'Internal Server Error' });
+8232 -10378
View File
File diff suppressed because it is too large Load Diff