Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Sentry): Intercepter 적용안되던 것 수정 #439 #440

Merged
merged 96 commits into from
Dec 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
4dbaa34
Merge pull request #222 from 42connected/feature
jeounpar Aug 26, 2022
1dcd43d
Merge pull request #225 from 42connected/production
rurruur Aug 26, 2022
ec44238
Merge pull request #227 from 42connected/production
jeounpar Aug 26, 2022
5657da9
Merge pull request #228 from 42connected/production
rurruur Aug 28, 2022
7dda03a
Merge pull request #231 from 42connected/production
rurruur Aug 28, 2022
c45c56a
Merge pull request #232 from 42connected/production
rurruur Aug 28, 2022
88e35f1
Merge pull request #238 from 42connected/production
jeounpar Aug 28, 2022
8806c24
Merge pull request #241 from 42connected/production
rurruur Aug 28, 2022
815125b
Merge pull request #264 from 42connected/feature
jeounpar Aug 30, 2022
0172fcd
Merge pull request #265 from 42connected/production
jeounpar Aug 30, 2022
ff49efe
Merge pull request #274 from 42connected/feature
rurruur Aug 30, 2022
8e74239
Merge pull request #275 from 42connected/production
rurruur Aug 30, 2022
574f657
Merge pull request #278 from 42connected/feature
rurruur Aug 31, 2022
74c00ed
Merge pull request #282 from 42connected/production
rurruur Aug 31, 2022
910bed3
Update v1.module.ts
rurruur Aug 31, 2022
15891a3
Merge pull request #285 from 42connected/feature
kanghyki Aug 31, 2022
b1a25c6
Merge pull request #287 from 42connected/production
kanghyki Aug 31, 2022
39b912c
Merge pull request #290 from 42connected/feature
rurruur Sep 1, 2022
e1c2cdd
Merge pull request #293 from 42connected/feature
rurruur Sep 1, 2022
74453a7
Merge pull request #291 from 42connected/feature
rurruur Sep 1, 2022
8b112da
Merge pull request #295 from 42connected/feature
rurruur Sep 4, 2022
f19c003
Merge pull request #296 from 42connected/develop
rurruur Sep 4, 2022
3b130fe
Merge pull request #299 from 42connected/feature
rurruur Sep 4, 2022
1f1009a
Merge pull request #302 from 42connected/feature
rurruur Sep 4, 2022
a55892a
Merge pull request #304 from 42connected/feature
rurruur Sep 4, 2022
0b7d752
Merge pull request #306 from 42connected/feature
rurruur Sep 4, 2022
b32df83
Merge pull request #308 from 42connected/feature
rurruur Sep 4, 2022
6b99589
Merge pull request #310 from 42connected/feature
rurruur Sep 4, 2022
d96dad9
Merge pull request #313 from 42connected/feature
rurruur Sep 5, 2022
11fdcc9
Merge pull request #315 from 42connected/feature
dkjefilsjl Sep 5, 2022
8ec63c1
Merge pull request #317 from 42connected/feature
rurruur Sep 5, 2022
1e3f909
Merge pull request #319 from 42connected/feature
jeounpar Sep 7, 2022
9545673
Merge pull request #323 from 42connected/feature
jeounpar Sep 9, 2022
6dec255
Merge pull request #324 from 42connected/feature
Joo-hyun-Kang Sep 9, 2022
ed494a0
Merge pull request #327 from 42connected/feature
kanghyki Sep 11, 2022
f22bf63
Merge pull request #330 from 42connected/feature
rurruur Sep 13, 2022
d23be13
Merge pull request #329 from 42connected/feature
jooocy Sep 13, 2022
01a1f3d
Merge pull request #333 from 42connected/feature
Joo-hyun-Kang Sep 13, 2022
29d26b6
Merge pull request #335 from 42connected/feature
rurruur Sep 13, 2022
c88524e
Merge pull request #300 from 42connected/develop
rurruur Sep 13, 2022
ce8218a
Merge pull request #337 from 42connected/feature
rurruur Sep 14, 2022
7ea0a93
Merge pull request #339 from 42connected/feature
Joo-hyun-Kang Sep 14, 2022
813c1a9
Merge pull request #340 from 42connected/develop
rurruur Sep 14, 2022
b334736
Merge pull request #342 from 42connected/feature
rurruur Sep 14, 2022
dfca5fa
Merge pull request #343 from 42connected/develop
rurruur Sep 14, 2022
7e62944
Merge pull request #345 from 42connected/feature
rurruur Sep 14, 2022
496ced7
Merge pull request #346 from 42connected/develop
rurruur Sep 14, 2022
7ded46d
Merge pull request #348 from 42connected/feature
rurruur Sep 15, 2022
9792880
Merge pull request #349 from 42connected/develop
rurruur Sep 15, 2022
b0062c3
Merge pull request #351 from 42connected/feature
rurruur Sep 15, 2022
e9c15d0
Merge pull request #352 from 42connected/develop
rurruur Sep 15, 2022
c63c2a8
Merge pull request #354 from 42connected/feature
rurruur Sep 18, 2022
3650d14
Merge pull request #355 from 42connected/develop
rurruur Sep 18, 2022
dedb197
Merge pull request #357 from 42connected/feature
rurruur Sep 18, 2022
b10a65a
Merge pull request #360 from 42connected/feature
rurruur Sep 18, 2022
62f93b5
Merge pull request #362 from 42connected/feature
rurruur Sep 18, 2022
b475d45
Merge pull request #364 from 42connected/feature
rurruur Sep 18, 2022
2831ae8
Merge pull request #358 from 42connected/develop
rurruur Sep 18, 2022
fdf751d
Merge pull request #366 from 42connected/feature
kanghyki Sep 18, 2022
a0c1b8e
Merge pull request #370 from 42connected/feature
rurruur Sep 19, 2022
e2b8716
Merge pull request #371 from 42connected/develop
rurruur Sep 19, 2022
9c2253d
Merge pull request #373 from 42connected/feature
rurruur Sep 19, 2022
624acae
Merge pull request #374 from 42connected/develop
rurruur Sep 19, 2022
37d70dc
Merge pull request #376 from 42connected/feature
rurruur Sep 19, 2022
ef2a50f
Merge pull request #377 from 42connected/develop
rurruur Sep 19, 2022
cbfb009
Merge pull request #379 from 42connected/feature
rurruur Sep 19, 2022
65b2730
Merge pull request #381 from 42connected/develop
Joo-hyun-Kang Sep 19, 2022
4c55544
Merge pull request #384 from 42connected/feature
rurruur Sep 26, 2022
5e39049
Merge pull request #385 from 42connected/develop
rurruur Sep 26, 2022
7ea6c25
Merge pull request #387 from 42connected/feature
rurruur Sep 26, 2022
5c124f5
Merge pull request #388 from 42connected/develop
rurruur Sep 26, 2022
67648eb
Merge pull request #391 from 42connected/feature
rurruur Oct 1, 2022
07f05dd
Merge pull request #392 from 42connected/develop
jeounpar Oct 2, 2022
98604de
Merge pull request #395 from 42connected/feature
rurruur Oct 8, 2022
d9dcc91
Merge pull request #399 from 42connected/feature
rurruur Oct 13, 2022
ea84fc8
Merge pull request #401 from 42connected/feature
rurruur Oct 13, 2022
34f584d
Merge pull request #396 from 42connected/develop
rurruur Oct 13, 2022
e1ec412
Merge pull request #402 from 42connected/hotfix
rurruur Oct 15, 2022
2a44f97
Merge pull request #404 from 42connected/feature
rurruur Oct 15, 2022
cb1e689
Merge pull request #406 from 42connected/feature
rurruur Oct 16, 2022
7969a1d
Merge pull request #409 from 42connected/feature
rurruur Oct 17, 2022
d7c97dc
Merge pull request #407 from 42connected/develop
rurruur Oct 17, 2022
15acd20
Merge pull request #411 from 42connected/feature
rurruur Oct 18, 2022
5acef6e
Merge pull request #413 from 42connected/feature
rurruur Oct 24, 2022
ab07528
Merge pull request #414 from 42connected/develop
rurruur Oct 24, 2022
817793b
feat: apply issue,pull-request template
Seojunhwan Nov 14, 2022
8713c38
Merge pull request #432 from 42connected/feature
kanghyki Nov 22, 2022
9843a12
Merge pull request #437 from 42connected/feature
jeounpar Nov 28, 2022
559d77a
POL-439 : bug sentry
jooocy Dec 2, 2022
e725f5a
Merge branch 'main' of github.com:42connected/polar-be into POL-439
jooocy Dec 2, 2022
d3a70ea
fix : commit에서 templates제거와 관련된 오류 수정
jooocy Dec 2, 2022
0b76c78
fix : .github 제외
jooocy Dec 2, 2022
584ddbc
fix : restore yml file
jooocy Dec 2, 2022
8b7da93
fix : file name
jooocy Dec 2, 2022
144d8ec
fix : templates files
jooocy Dec 3, 2022
35d924d
Merge branch 'feature' into POL-439
jooocy Dec 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ dump.rdb
# Seeder
# /src/v1/seeder


*.md
*.xlsx
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,10 @@ import { MentoringLogsModule } from './v1/mentoring-logs/mentoring-logs.module';
import { EmailVerificationModule } from './v1/email-verifications/email-verifications.module';
import { AllExceptionsFilter } from './http-exception.filter';
import { MentoringLogScheduler } from './v1/batch/mentoring-logs-scheduler';
import { RavenInterceptor, RavenModule } from 'nest-raven';
import { SentryInterceptor } from './sentry.intercepter';

@Module({
imports: [
RavenModule,
ScheduleModule.forRoot(),
MailerModule.forRootAsync({
useFactory: () => ({
Expand Down Expand Up @@ -128,7 +127,7 @@ import { RavenInterceptor, RavenModule } from 'nest-raven';
providers: [
{
provide: APP_INTERCEPTOR,
useValue: new RavenInterceptor(),
useValue: SentryInterceptor,
},
AppService,
{
Expand Down
2 changes: 2 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { AppModule } from './app.module';
import * as expressBasicAuth from 'express-basic-auth';
import { setupSwagger } from './util/swagger';
import * as Sentry from '@sentry/node';
import { SentryInterceptor } from './sentry.intercepter';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
Expand All @@ -12,6 +13,7 @@ async function bootstrap() {
dsn: process.env.SENTRY_DSN,
debug: true,
});
app.useGlobalInterceptors(new SentryInterceptor());

app.useGlobalPipes(
new ValidationPipe({
Expand Down
19 changes: 19 additions & 0 deletions src/sentry.intercepter.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {
CallHandler,
ExecutionContext,
Injectable,
NestInterceptor,
} from '@nestjs/common';
import { Observable, tap } from 'rxjs';
import * as Sentry from '@sentry/node';

@Injectable()
export class SentryInterceptor implements NestInterceptor {
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
return next.handle().pipe(
tap(error => {
Sentry.captureException(error);
}),
);
}
}