File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -53,15 +53,6 @@ export function tracingHandler(): (
53
53
return next ( ) ;
54
54
}
55
55
56
- if ( ! hasTracingEnabled ( options ) ) {
57
- __DEBUG_BUILD__ &&
58
- logger . warn (
59
- 'Sentry `tracingHandler` is being used, but tracing is disabled. Please enable tracing by setting ' +
60
- 'either `tracesSampleRate` or `tracesSampler` in your `Sentry.init()` options.' ,
61
- ) ;
62
- return next ( ) ;
63
- }
64
-
65
56
const sentryTrace = req . headers && isString ( req . headers [ 'sentry-trace' ] ) ? req . headers [ 'sentry-trace' ] : undefined ;
66
57
const baggage = req . headers ?. baggage ;
67
58
const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders (
@@ -70,6 +61,10 @@ export function tracingHandler(): (
70
61
) ;
71
62
hub . getScope ( ) . setPropagationContext ( propagationContext ) ;
72
63
64
+ if ( ! hasTracingEnabled ( options ) ) {
65
+ return next ( ) ;
66
+ }
67
+
73
68
const [ name , source ] = extractPathForTransaction ( req , { path : true , method : true } ) ;
74
69
const transaction = startTransaction (
75
70
{
You can’t perform that action at this time.
0 commit comments