@@ -29,6 +29,10 @@ import { isExpectedError } from './helpers';
2929
3030/**
3131 * Interceptor to add Sentry tracing capabilities to Nest.js applications.
32+ *
33+ * @deprecated `SentryTracingInterceptor` is deprecated.
34+ * If you are using `@sentry/nestjs` you can safely remove any references to the `SentryTracingInterceptor`.
35+ * If you are using another package migrate to `@sentry/nestjs` and remove the `SentryTracingInterceptor` afterwards.
3236 */
3337class SentryTracingInterceptor implements NestInterceptor {
3438 // used to exclude this class from being auto-instrumented
@@ -59,7 +63,9 @@ class SentryTracingInterceptor implements NestInterceptor {
5963 return next . handle ( ) ;
6064 }
6165}
66+ // eslint-disable-next-line deprecation/deprecation
6267Injectable ( ) ( SentryTracingInterceptor ) ;
68+ // eslint-disable-next-line deprecation/deprecation
6369export { SentryTracingInterceptor } ;
6470
6571/**
@@ -108,6 +114,8 @@ export { SentryGlobalFilter };
108114
109115/**
110116 * Global filter to handle exceptions in NestJS + GraphQL applications and report them to Sentry.
117+ *
118+ * @deprecated `SentryGlobalGraphQLFilter` is deprecated. Use the `SentryGlobalFilter` instead. The `SentryGlobalFilter` is a drop-in replacement.
111119 */
112120class SentryGlobalGraphQLFilter {
113121 private static readonly _logger = new Logger ( 'ExceptionsHandler' ) ;
@@ -127,24 +135,33 @@ class SentryGlobalGraphQLFilter {
127135 throw exception ;
128136 }
129137 if ( exception instanceof Error ) {
138+ // eslint-disable-next-line deprecation/deprecation
130139 SentryGlobalGraphQLFilter . _logger . error ( exception . message , exception . stack ) ;
131140 }
132141 captureException ( exception ) ;
133142 throw exception ;
134143 }
135144}
145+ // eslint-disable-next-line deprecation/deprecation
136146Catch ( ) ( SentryGlobalGraphQLFilter ) ;
147+ // eslint-disable-next-line deprecation/deprecation
137148export { SentryGlobalGraphQLFilter } ;
138149
139150/**
140151 * Global filter to handle exceptions and report them to Sentry.
141152 *
142153 * This filter is a generic filter that can handle both HTTP and GraphQL exceptions.
154+ *
155+ * @deprecated `SentryGlobalGenericFilter` is deprecated. Use the `SentryGlobalFilter` instead. The `SentryGlobalFilter` is a drop-in replacement.
143156 */
144157export const SentryGlobalGenericFilter = SentryGlobalFilter ;
145158
146159/**
147160 * Service to set up Sentry performance tracing for Nest.js applications.
161+ *
162+ * @deprecated `SentryService` is deprecated.
163+ * If you are using `@sentry/nestjs` you can safely remove any references to the `SentryService`.
164+ * If you are using another package migrate to `@sentry/nestjs` and remove the `SentryService` afterwards.
148165 */
149166class SentryService implements OnModuleInit {
150167 public readonly __SENTRY_INTERNAL__ : boolean ;
@@ -168,7 +185,9 @@ class SentryService implements OnModuleInit {
168185 }
169186 }
170187}
188+ // eslint-disable-next-line deprecation/deprecation
171189Injectable ( ) ( SentryService ) ;
190+ // eslint-disable-next-line deprecation/deprecation
172191export { SentryService } ;
173192
174193/**
@@ -182,25 +201,31 @@ class SentryModule {
182201 return {
183202 module : SentryModule ,
184203 providers : [
204+ // eslint-disable-next-line deprecation/deprecation
185205 SentryService ,
186206 {
187207 provide : APP_INTERCEPTOR ,
208+ // eslint-disable-next-line deprecation/deprecation
188209 useClass : SentryTracingInterceptor ,
189210 } ,
190211 ] ,
212+ // eslint-disable-next-line deprecation/deprecation
191213 exports : [ SentryService ] ,
192214 } ;
193215 }
194216}
195217Global ( ) ( SentryModule ) ;
196218Module ( {
197219 providers : [
220+ // eslint-disable-next-line deprecation/deprecation
198221 SentryService ,
199222 {
200223 provide : APP_INTERCEPTOR ,
224+ // eslint-disable-next-line deprecation/deprecation
201225 useClass : SentryTracingInterceptor ,
202226 } ,
203227 ] ,
228+ // eslint-disable-next-line deprecation/deprecation
204229 exports : [ SentryService ] ,
205230} ) ( SentryModule ) ;
206231export { SentryModule } ;
0 commit comments