Skip to content

Commit

Permalink
fix(back): actually init SentryInterceptor
Browse files Browse the repository at this point in the history
  • Loading branch information
tsa96 committed Jul 6, 2024
1 parent 79c7f16 commit f4f87f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/backend/src/app/modules/sentry/sentry.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from './sentry.interface';
import { SENTRY_INIT_STATE, SENTRY_MODULE_OPTIONS } from './sentry.const';
import { SentryInterceptor } from '../../interceptors/sentry.interceptor';
import { APP_INTERCEPTOR } from '@nestjs/core';

@Module({})
export class SentryModule {
Expand Down Expand Up @@ -55,7 +56,7 @@ export class SentryModule {
},
{
inject: [SENTRY_MODULE_OPTIONS, SENTRY_INIT_STATE],
provide: SentryInterceptor,
provide: APP_INTERCEPTOR,
// Only actually instantiate the service if we initialised Sentry and
// have tracing enabled
useFactory: (
Expand All @@ -65,7 +66,7 @@ export class SentryModule {
enableTracing && initState ? new SentryInterceptor() : undefined
}
],
exports: [SentryInterceptor, SENTRY_INIT_STATE]
exports: [SENTRY_INIT_STATE]
};
}
}

0 comments on commit f4f87f8

Please sign in to comment.