@@ -29,6 +29,10 @@ import { isExpectedError } from './helpers';
29
29
30
30
/**
31
31
* 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.
32
36
*/
33
37
class SentryTracingInterceptor implements NestInterceptor {
34
38
// used to exclude this class from being auto-instrumented
@@ -59,7 +63,9 @@ class SentryTracingInterceptor implements NestInterceptor {
59
63
return next . handle ( ) ;
60
64
}
61
65
}
66
+ // eslint-disable-next-line deprecation/deprecation
62
67
Injectable ( ) ( SentryTracingInterceptor ) ;
68
+ // eslint-disable-next-line deprecation/deprecation
63
69
export { SentryTracingInterceptor } ;
64
70
65
71
/**
@@ -108,6 +114,8 @@ export { SentryGlobalFilter };
108
114
109
115
/**
110
116
* 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.
111
119
*/
112
120
class SentryGlobalGraphQLFilter {
113
121
private static readonly _logger = new Logger ( 'ExceptionsHandler' ) ;
@@ -127,24 +135,33 @@ class SentryGlobalGraphQLFilter {
127
135
throw exception ;
128
136
}
129
137
if ( exception instanceof Error ) {
138
+ // eslint-disable-next-line deprecation/deprecation
130
139
SentryGlobalGraphQLFilter . _logger . error ( exception . message , exception . stack ) ;
131
140
}
132
141
captureException ( exception ) ;
133
142
throw exception ;
134
143
}
135
144
}
145
+ // eslint-disable-next-line deprecation/deprecation
136
146
Catch ( ) ( SentryGlobalGraphQLFilter ) ;
147
+ // eslint-disable-next-line deprecation/deprecation
137
148
export { SentryGlobalGraphQLFilter } ;
138
149
139
150
/**
140
151
* Global filter to handle exceptions and report them to Sentry.
141
152
*
142
153
* 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.
143
156
*/
144
157
export const SentryGlobalGenericFilter = SentryGlobalFilter ;
145
158
146
159
/**
147
160
* 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.
148
165
*/
149
166
class SentryService implements OnModuleInit {
150
167
public readonly __SENTRY_INTERNAL__ : boolean ;
@@ -168,7 +185,9 @@ class SentryService implements OnModuleInit {
168
185
}
169
186
}
170
187
}
188
+ // eslint-disable-next-line deprecation/deprecation
171
189
Injectable ( ) ( SentryService ) ;
190
+ // eslint-disable-next-line deprecation/deprecation
172
191
export { SentryService } ;
173
192
174
193
/**
@@ -182,25 +201,31 @@ class SentryModule {
182
201
return {
183
202
module : SentryModule ,
184
203
providers : [
204
+ // eslint-disable-next-line deprecation/deprecation
185
205
SentryService ,
186
206
{
187
207
provide : APP_INTERCEPTOR ,
208
+ // eslint-disable-next-line deprecation/deprecation
188
209
useClass : SentryTracingInterceptor ,
189
210
} ,
190
211
] ,
212
+ // eslint-disable-next-line deprecation/deprecation
191
213
exports : [ SentryService ] ,
192
214
} ;
193
215
}
194
216
}
195
217
Global ( ) ( SentryModule ) ;
196
218
Module ( {
197
219
providers : [
220
+ // eslint-disable-next-line deprecation/deprecation
198
221
SentryService ,
199
222
{
200
223
provide : APP_INTERCEPTOR ,
224
+ // eslint-disable-next-line deprecation/deprecation
201
225
useClass : SentryTracingInterceptor ,
202
226
} ,
203
227
] ,
228
+ // eslint-disable-next-line deprecation/deprecation
204
229
exports : [ SentryService ] ,
205
230
} ) ( SentryModule ) ;
206
231
export { SentryModule } ;
0 commit comments