Skip to content

Commit

Permalink
fix: removed sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
rflihxyz committed Dec 15, 2024
1 parent fb30b04 commit 2f0c07d
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 118 deletions.
20 changes: 0 additions & 20 deletions packages/api/src/@core/@core-services/sentry/instrument.ts

This file was deleted.

23 changes: 0 additions & 23 deletions packages/api/src/@core/@core-services/sentry/sentry.interceptor.ts

This file was deleted.

8 changes: 0 additions & 8 deletions packages/api/src/@core/@core-services/sentry/sentry.module.ts

This file was deleted.

24 changes: 0 additions & 24 deletions packages/api/src/@core/@core-services/sentry/sentry.service.ts

This file was deleted.

11 changes: 3 additions & 8 deletions packages/api/src/@core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import { PassthroughModule } from './passthrough/passthrough.module';
import { ProjectConnectorsModule } from './project-connectors/project-connectors.module';
import { ProjectsModule } from './projects/projects.module';
import { SyncModule } from './sync/sync.module';
import { SentryModule } from './@core-services/sentry/sentry.module';
import { SentryInterceptor } from './@core-services/sentry/sentry.interceptor';
// import { SentryModule } from './@core-services/sentry/sentry.module';
// import { SentryInterceptor } from './@core-services/sentry/sentry.interceptor';
import { APP_INTERCEPTOR } from '@nestjs/core';

@Module({
Expand All @@ -38,7 +38,6 @@ import { APP_INTERCEPTOR } from '@nestjs/core';
SyncModule,
ProjectConnectorsModule,
BullQueueModule,
SentryModule,
],
exports: [
AuthModule,
Expand All @@ -58,14 +57,10 @@ import { APP_INTERCEPTOR } from '@nestjs/core';
ProjectConnectorsModule,
IngestDataService,
BullQueueModule,
SentryModule,
],
providers: [
IngestDataService,
{
provide: APP_INTERCEPTOR,
useClass: SentryInterceptor,
},

],
})
export class CoreModule {}
28 changes: 0 additions & 28 deletions packages/api/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ import { MarketingAutomationModule } from './marketingautomation/marketingautoma
import { CoreSharedModule } from '@@core/@core-services/module';
import { EcommerceModule } from '@ecommerce/ecommerce.module';

// // Sentry Dependencies
// import { APP_INTERCEPTOR } from '@nestjs/core';
// import { HttpException } from '@nestjs/common';
// import { SentryModule, SentryInterceptor } from '@ntegral/nestjs-sentry';

@Module({
imports: [
CoreSharedModule,
Expand All @@ -38,17 +33,6 @@ import { EcommerceModule } from '@ecommerce/ecommerce.module';
},
]),
ConfigModule.forRoot({ isGlobal: true }),
// ...(process.env.DISTRIBUTION === 'managed'
// ? [
// SentryModule.forRoot({
// dsn: process.env.SENTRY_DSN,
// debug: true,
// environment: `${process.env.ENV}-${process.env.DISTRIBUTION}`,
// release: `${process.env.DISTRIBUTION}`,
// logLevels: ['debug', 'error'],
// }),
// ]
// : []),
ScheduleModule.forRoot(),
LoggerModule.forRoot({
pinoHttp: {
Expand Down Expand Up @@ -95,18 +79,6 @@ import { EcommerceModule } from '@ecommerce/ecommerce.module';
provide: APP_GUARD,
useClass: ThrottlerGuard,
},
// {
// provide: APP_INTERCEPTOR,
// useFactory: () =>
// new SentryInterceptor({
// filters: [
// {
// type: HttpException,
// filter: (exception: HttpException) => 500 > exception.getStatus(), // Only report 500 errors
// },
// ],
// }),
// },
],
})
export class AppModule {}
1 change: 0 additions & 1 deletion packages/api/src/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Injectable } from '@nestjs/common';
export class AppService {
getHello(): string {
//console.log(process.env.SENTRY_DSN);
//throw new Error("My first Sentry error!");
return `Hello You Are On The Panora API!`;
}
}
6 changes: 0 additions & 6 deletions packages/api/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import '@@core/@core-services/sentry/instrument';

import { HttpAdapterHost, NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { useContainer } from 'class-validator';
Expand All @@ -11,7 +9,6 @@ import { Logger, LoggerErrorInterceptor } from 'nestjs-pino';
import { AppModule } from './app.module';
import { generatePanoraParamsSpec } from '@@core/utils/decorators/utils';
import { AllExceptionsFilter } from '@@core/utils/exception.filter';
import { SentryService } from './@core/@core-services/sentry/sentry.service';

function addSpeakeasyGroup(document: any) {
for (const path in document.paths) {
Expand Down Expand Up @@ -115,9 +112,6 @@ async function bootstrap() {
const httpAdapter = app.get(HttpAdapterHost);
app.useGlobalFilters(new AllExceptionsFilter(httpAdapter));

// Initialize Sentry
app.get(SentryService);

await app.listen(3000);
}
bootstrap();

0 comments on commit 2f0c07d

Please sign in to comment.