Skip to content

Commit

Permalink
remove sentry integration
Browse files Browse the repository at this point in the history
  • Loading branch information
AmruthPillai committed Nov 24, 2022
1 parent a6fbb81 commit 4b1ce53
Show file tree
Hide file tree
Showing 17 changed files with 3 additions and 119 deletions.
4 changes: 0 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
TURBO_TEAM=
TURBO_TOKEN=

# Error Logging
SERVER_SENTRY_DSN=
PUBLIC_CLIENT_SENTRY_DSN=

# Server + Client
TZ=UTC
PUBLIC_URL=http://localhost:3000
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/digitalocean-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy Latest Version on DigitalOcean

on:
workflow_dispatch:
workflow_run:
workflows:
- Build and Push Docker Image
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,11 @@ jobs:

- name: Build and Push Docker Image
uses: docker/[email protected]
env:
SENTRY_ORG: reactive-resume
SENTRY_URL: https://sentry.io
SENTRY_PROJECT: ${{ matrix.image }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
with:
context: .
push: true
platforms: ${{ matrix.arch }}
file: ${{ matrix.image }}/Dockerfile
build-args: |
SENTRY_ORG=reactive-resume
SENTRY_URL=https://sentry.io
SENTRY_PROJECT=${{ matrix.image }}
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
tags: |
amruthpillai/reactive-resume:${{ matrix.image }}-latest
amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
Expand Down
3 changes: 0 additions & 3 deletions client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,3 @@ __ENV.js

# next-sitemap
sitemap*.xml

# Sentry
.sentryclirc
14 changes: 1 addition & 13 deletions client/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { version } = require('../package.json');
const { i18n } = require('./next-i18next.config');
const { withSentryConfig } = require('@sentry/nextjs');

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand All @@ -16,10 +15,6 @@ const nextConfig = {
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
},

sentry: {
hideSourceMaps: true,
},

// Hack to make Tailwind darkMode 'class' strategy with CSS Modules
// Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156
webpack: (config) => {
Expand Down Expand Up @@ -52,11 +47,4 @@ const nextConfig = {
},
};

/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
const sentryConfig = {
silent: true,
authToken: process.env.SENTRY_AUTH_TOKEN,
dryRun: process.env.NODE_ENV !== 'production',
};

module.exports = withSentryConfig(nextConfig, sentryConfig);
module.exports = nextConfig;
1 change: 0 additions & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@next/env": "^13.0.5",
"@react-oauth/google": "^0.5.0",
"@reduxjs/toolkit": "^1.9.0",
"@sentry/nextjs": "^7.21.1",
"axios": "^1.2.0",
"clsx": "^1.2.1",
"dayjs": "^1.11.6",
Expand Down
16 changes: 0 additions & 16 deletions client/pages/_error.tsx

This file was deleted.

11 changes: 0 additions & 11 deletions client/sentry.client.config.js

This file was deleted.

3 changes: 0 additions & 3 deletions client/sentry.properties

This file was deleted.

11 changes: 0 additions & 11 deletions client/sentry.server.config.js

This file was deleted.

1 change: 0 additions & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"@nestjs/serve-static": "^3.0.0",
"@nestjs/terminus": "^9.1.3",
"@nestjs/typeorm": "^9.0.1",
"@sentry/node": "^7.21.1",
"@types/passport": "^1.0.11",
"bcryptjs": "^2.4.3",
"cache-manager": "^5.1.3",
Expand Down
3 changes: 0 additions & 3 deletions server/sentry.properties

This file was deleted.

5 changes: 0 additions & 5 deletions server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { HttpExceptionFilter } from './filters/http-exception.filter';
import { FontsModule } from './fonts/fonts.module';
import { HealthModule } from './health/health.module';
import { IntegrationsModule } from './integrations/integrations.module';
import { SentryInterceptor } from './interceptors/sentry.interceptor';
import { MailModule } from './mail/mail.module';
import { PrinterModule } from './printer/printer.module';
import { ResumeModule } from './resume/resume.module';
Expand Down Expand Up @@ -41,10 +40,6 @@ import { UsersModule } from './users/users.module';
provide: APP_INTERCEPTOR,
useClass: ClassSerializerInterceptor,
},
{
provide: APP_INTERCEPTOR,
useClass: SentryInterceptor,
},
{
provide: APP_FILTER,
useClass: HttpExceptionFilter,
Expand Down
15 changes: 1 addition & 14 deletions server/src/config/config.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import authConfig from './auth.config';
import cacheConfig from './cache.config';
import databaseConfig from './database.config';
import googleConfig from './google.config';
import loggingConfig from './logging.config';
import mailConfig from './mail.config';
import storageConfig from './storage.config';

Expand Down Expand Up @@ -59,24 +58,12 @@ const validationSchema = Joi.object({
PDF_DELETION_TIME: Joi.number()
.default(4 * 24 * 60 * 60 * 1000) // 4 days
.allow(''),

// Logging
SERVER_SENTRY_DSN: Joi.string().allow(''),
});

@Module({
imports: [
NestConfigModule.forRoot({
load: [
appConfig,
authConfig,
cacheConfig,
databaseConfig,
googleConfig,
mailConfig,
storageConfig,
loggingConfig,
],
load: [appConfig, authConfig, cacheConfig, databaseConfig, googleConfig, mailConfig, storageConfig],
validationSchema: validationSchema,
}),
],
Expand Down
5 changes: 0 additions & 5 deletions server/src/config/logging.config.ts

This file was deleted.

15 changes: 0 additions & 15 deletions server/src/interceptors/sentry.interceptor.ts

This file was deleted.

4 changes: 0 additions & 4 deletions server/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Logger, ValidationPipe } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { NestFactory } from '@nestjs/core';
import { NestExpressApplication } from '@nestjs/platform-express';
import * as Sentry from '@sentry/node';
import cookieParser from 'cookie-parser';

import { AppModule } from './app.module';
Expand All @@ -19,9 +18,6 @@ const bootstrap = async () => {
// Pipes
app.useGlobalPipes(new ValidationPipe({ transform: true }));

// Error Logging
Sentry.init({ dsn: configService.get<string>('logging.sentryDSN') });

// Server Port
const port = configService.get<number>('app.port');
await app.listen(port);
Expand Down

0 comments on commit 4b1ce53

Please sign in to comment.