File tree 1 file changed +8
-13
lines changed
1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -9,19 +9,6 @@ import {
9
9
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node' ;
10
10
import * as Sentry from '@sentry/node' ;
11
11
12
- if ( process . env . SENTRY_DSN ) {
13
- Sentry . init ( {
14
- dsn : process . env . SENTRY_DSN ,
15
- environment : process . env . NODE_ENV || 'unknown' ,
16
- release : process . env . K_REVISION ,
17
-
18
- // Enabled sampling but disable default integrations
19
- // Without this, OTel won't work, and I'm not sure why
20
- defaultIntegrations : false ,
21
- tracesSampleRate : 1.0 ,
22
- } ) ;
23
- }
24
-
25
12
const sdk = new NodeSDK ( {
26
13
instrumentations : getNodeAutoInstrumentations ( {
27
14
'@opentelemetry/instrumentation-mysql2' : {
74
61
console . error ( e ) ;
75
62
}
76
63
64
+ if ( process . env . SENTRY_DSN ) {
65
+ Sentry . init ( {
66
+ dsn : process . env . SENTRY_DSN ,
67
+ environment : process . env . NODE_ENV || 'unknown' ,
68
+ release : process . env . K_REVISION ,
69
+ } ) ;
70
+ }
71
+
77
72
export function spanWrapper < TArgs extends unknown [ ] , TReturn > (
78
73
fn : ( ...args : TArgs ) => TReturn | Promise < TReturn > ,
79
74
) {
You can’t perform that action at this time.
0 commit comments