mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 20:42:29 +10:00
remove sentry integration
This commit is contained in:
@ -2,10 +2,6 @@
|
|||||||
TURBO_TEAM=
|
TURBO_TEAM=
|
||||||
TURBO_TOKEN=
|
TURBO_TOKEN=
|
||||||
|
|
||||||
# Error Logging
|
|
||||||
SERVER_SENTRY_DSN=
|
|
||||||
PUBLIC_CLIENT_SENTRY_DSN=
|
|
||||||
|
|
||||||
# Server + Client
|
# Server + Client
|
||||||
TZ=UTC
|
TZ=UTC
|
||||||
PUBLIC_URL=http://localhost:3000
|
PUBLIC_URL=http://localhost:3000
|
||||||
|
|||||||
1
.github/workflows/digitalocean-deploy.yml
vendored
1
.github/workflows/digitalocean-deploy.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
name: Deploy Latest Version on DigitalOcean
|
name: Deploy Latest Version on DigitalOcean
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows:
|
workflows:
|
||||||
- Build and Push Docker Image
|
- Build and Push Docker Image
|
||||||
|
|||||||
10
.github/workflows/docker-build-push.yml
vendored
10
.github/workflows/docker-build-push.yml
vendored
@ -51,21 +51,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and Push Docker Image
|
- name: Build and Push Docker Image
|
||||||
uses: docker/build-push-action@v3.2.0
|
uses: docker/build-push-action@v3.2.0
|
||||||
env:
|
|
||||||
SENTRY_ORG: reactive-resume
|
|
||||||
SENTRY_URL: https://sentry.io
|
|
||||||
SENTRY_PROJECT: ${{ matrix.image }}
|
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
platforms: ${{ matrix.arch }}
|
platforms: ${{ matrix.arch }}
|
||||||
file: ${{ matrix.image }}/Dockerfile
|
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: |
|
tags: |
|
||||||
amruthpillai/reactive-resume:${{ matrix.image }}-latest
|
amruthpillai/reactive-resume:${{ matrix.image }}-latest
|
||||||
amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
|
amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
|
||||||
|
|||||||
3
client/.gitignore
vendored
3
client/.gitignore
vendored
@ -40,6 +40,3 @@ __ENV.js
|
|||||||
|
|
||||||
# next-sitemap
|
# next-sitemap
|
||||||
sitemap*.xml
|
sitemap*.xml
|
||||||
|
|
||||||
# Sentry
|
|
||||||
.sentryclirc
|
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
const { version } = require('../package.json');
|
const { version } = require('../package.json');
|
||||||
const { i18n } = require('./next-i18next.config');
|
const { i18n } = require('./next-i18next.config');
|
||||||
const { withSentryConfig } = require('@sentry/nextjs');
|
|
||||||
|
|
||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
const nextConfig = {
|
const nextConfig = {
|
||||||
@ -16,10 +15,6 @@ const nextConfig = {
|
|||||||
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
|
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
|
||||||
},
|
},
|
||||||
|
|
||||||
sentry: {
|
|
||||||
hideSourceMaps: true,
|
|
||||||
},
|
|
||||||
|
|
||||||
// Hack to make Tailwind darkMode 'class' strategy with CSS Modules
|
// Hack to make Tailwind darkMode 'class' strategy with CSS Modules
|
||||||
// Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156
|
// Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156
|
||||||
webpack: (config) => {
|
webpack: (config) => {
|
||||||
@ -52,11 +47,4 @@ const nextConfig = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
|
module.exports = nextConfig;
|
||||||
const sentryConfig = {
|
|
||||||
silent: true,
|
|
||||||
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
||||||
dryRun: process.env.NODE_ENV !== 'production',
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
|
||||||
|
|||||||
@ -24,7 +24,6 @@
|
|||||||
"@next/env": "^13.0.5",
|
"@next/env": "^13.0.5",
|
||||||
"@react-oauth/google": "^0.5.0",
|
"@react-oauth/google": "^0.5.0",
|
||||||
"@reduxjs/toolkit": "^1.9.0",
|
"@reduxjs/toolkit": "^1.9.0",
|
||||||
"@sentry/nextjs": "^7.21.1",
|
|
||||||
"axios": "^1.2.0",
|
"axios": "^1.2.0",
|
||||||
"clsx": "^1.2.1",
|
"clsx": "^1.2.1",
|
||||||
"dayjs": "^1.11.6",
|
"dayjs": "^1.11.6",
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
import * as Sentry from '@sentry/nextjs';
|
|
||||||
import type { NextPage } from 'next';
|
|
||||||
import type { ErrorProps } from 'next/error';
|
|
||||||
import NextErrorComponent from 'next/error';
|
|
||||||
|
|
||||||
const CustomErrorComponent: NextPage<ErrorProps> = (props) => {
|
|
||||||
return <NextErrorComponent statusCode={props.statusCode} />;
|
|
||||||
};
|
|
||||||
|
|
||||||
CustomErrorComponent.getInitialProps = async (contextData) => {
|
|
||||||
await Sentry.captureUnderscoreErrorException(contextData);
|
|
||||||
|
|
||||||
return NextErrorComponent.getInitialProps(contextData);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default CustomErrorComponent;
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
import env from '@beam-australia/react-env';
|
|
||||||
import * as Sentry from '@sentry/nextjs';
|
|
||||||
|
|
||||||
const sentryDSN =
|
|
||||||
env('CLIENT_SENTRY_DSN') ||
|
|
||||||
'https://aceffdbdaa544768bc85216e7c6a9c50@o4504211187564544.ingest.sentry.io/4504213380071424';
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: sentryDSN,
|
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
});
|
|
||||||
@ -1,3 +0,0 @@
|
|||||||
defaults.project=client
|
|
||||||
defaults.org=reactive-resume
|
|
||||||
defaults.url=https://sentry.io/
|
|
||||||
@ -1,11 +0,0 @@
|
|||||||
import env from '@beam-australia/react-env';
|
|
||||||
import * as Sentry from '@sentry/nextjs';
|
|
||||||
|
|
||||||
const sentryDSN =
|
|
||||||
env('CLIENT_SENTRY_DSN') ||
|
|
||||||
'https://aceffdbdaa544768bc85216e7c6a9c50@o4504211187564544.ingest.sentry.io/4504213380071424';
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: sentryDSN,
|
|
||||||
tracesSampleRate: 1.0,
|
|
||||||
});
|
|
||||||
@ -21,7 +21,6 @@
|
|||||||
"@nestjs/serve-static": "^3.0.0",
|
"@nestjs/serve-static": "^3.0.0",
|
||||||
"@nestjs/terminus": "^9.1.3",
|
"@nestjs/terminus": "^9.1.3",
|
||||||
"@nestjs/typeorm": "^9.0.1",
|
"@nestjs/typeorm": "^9.0.1",
|
||||||
"@sentry/node": "^7.21.1",
|
|
||||||
"@types/passport": "^1.0.11",
|
"@types/passport": "^1.0.11",
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
"cache-manager": "^5.1.3",
|
"cache-manager": "^5.1.3",
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
defaults.project=server
|
|
||||||
defaults.org=reactive-resume
|
|
||||||
defaults.url=https://sentry.io/
|
|
||||||
@ -11,7 +11,6 @@ import { HttpExceptionFilter } from './filters/http-exception.filter';
|
|||||||
import { FontsModule } from './fonts/fonts.module';
|
import { FontsModule } from './fonts/fonts.module';
|
||||||
import { HealthModule } from './health/health.module';
|
import { HealthModule } from './health/health.module';
|
||||||
import { IntegrationsModule } from './integrations/integrations.module';
|
import { IntegrationsModule } from './integrations/integrations.module';
|
||||||
import { SentryInterceptor } from './interceptors/sentry.interceptor';
|
|
||||||
import { MailModule } from './mail/mail.module';
|
import { MailModule } from './mail/mail.module';
|
||||||
import { PrinterModule } from './printer/printer.module';
|
import { PrinterModule } from './printer/printer.module';
|
||||||
import { ResumeModule } from './resume/resume.module';
|
import { ResumeModule } from './resume/resume.module';
|
||||||
@ -41,10 +40,6 @@ import { UsersModule } from './users/users.module';
|
|||||||
provide: APP_INTERCEPTOR,
|
provide: APP_INTERCEPTOR,
|
||||||
useClass: ClassSerializerInterceptor,
|
useClass: ClassSerializerInterceptor,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
provide: APP_INTERCEPTOR,
|
|
||||||
useClass: SentryInterceptor,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
provide: APP_FILTER,
|
provide: APP_FILTER,
|
||||||
useClass: HttpExceptionFilter,
|
useClass: HttpExceptionFilter,
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import authConfig from './auth.config';
|
|||||||
import cacheConfig from './cache.config';
|
import cacheConfig from './cache.config';
|
||||||
import databaseConfig from './database.config';
|
import databaseConfig from './database.config';
|
||||||
import googleConfig from './google.config';
|
import googleConfig from './google.config';
|
||||||
import loggingConfig from './logging.config';
|
|
||||||
import mailConfig from './mail.config';
|
import mailConfig from './mail.config';
|
||||||
import storageConfig from './storage.config';
|
import storageConfig from './storage.config';
|
||||||
|
|
||||||
@ -59,24 +58,12 @@ const validationSchema = Joi.object({
|
|||||||
PDF_DELETION_TIME: Joi.number()
|
PDF_DELETION_TIME: Joi.number()
|
||||||
.default(4 * 24 * 60 * 60 * 1000) // 4 days
|
.default(4 * 24 * 60 * 60 * 1000) // 4 days
|
||||||
.allow(''),
|
.allow(''),
|
||||||
|
|
||||||
// Logging
|
|
||||||
SERVER_SENTRY_DSN: Joi.string().allow(''),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
NestConfigModule.forRoot({
|
NestConfigModule.forRoot({
|
||||||
load: [
|
load: [appConfig, authConfig, cacheConfig, databaseConfig, googleConfig, mailConfig, storageConfig],
|
||||||
appConfig,
|
|
||||||
authConfig,
|
|
||||||
cacheConfig,
|
|
||||||
databaseConfig,
|
|
||||||
googleConfig,
|
|
||||||
mailConfig,
|
|
||||||
storageConfig,
|
|
||||||
loggingConfig,
|
|
||||||
],
|
|
||||||
validationSchema: validationSchema,
|
validationSchema: validationSchema,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,5 +0,0 @@
|
|||||||
import { registerAs } from '@nestjs/config';
|
|
||||||
|
|
||||||
export default registerAs('logging', () => ({
|
|
||||||
sentryDSN: process.env.SERVER_SENTRY_DSN,
|
|
||||||
}));
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
|
|
||||||
import * as Sentry from '@sentry/node';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { tap } from 'rxjs/operators';
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class SentryInterceptor implements NestInterceptor {
|
|
||||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
|
||||||
return next.handle().pipe(
|
|
||||||
tap(null, (exception) => {
|
|
||||||
Sentry.captureException(exception);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -2,7 +2,6 @@ import { Logger, ValidationPipe } from '@nestjs/common';
|
|||||||
import { ConfigService } from '@nestjs/config';
|
import { ConfigService } from '@nestjs/config';
|
||||||
import { NestFactory } from '@nestjs/core';
|
import { NestFactory } from '@nestjs/core';
|
||||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||||
import * as Sentry from '@sentry/node';
|
|
||||||
import cookieParser from 'cookie-parser';
|
import cookieParser from 'cookie-parser';
|
||||||
|
|
||||||
import { AppModule } from './app.module';
|
import { AppModule } from './app.module';
|
||||||
@ -19,9 +18,6 @@ const bootstrap = async () => {
|
|||||||
// Pipes
|
// Pipes
|
||||||
app.useGlobalPipes(new ValidationPipe({ transform: true }));
|
app.useGlobalPipes(new ValidationPipe({ transform: true }));
|
||||||
|
|
||||||
// Error Logging
|
|
||||||
Sentry.init({ dsn: configService.get<string>('logging.sentryDSN') });
|
|
||||||
|
|
||||||
// Server Port
|
// Server Port
|
||||||
const port = configService.get<number>('app.port');
|
const port = configService.get<number>('app.port');
|
||||||
await app.listen(port);
|
await app.listen(port);
|
||||||
|
|||||||
Reference in New Issue
Block a user