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(): (
5353 return next ( ) ;
5454 }
5555
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-
6556 const sentryTrace = req . headers && isString ( req . headers [ 'sentry-trace' ] ) ? req . headers [ 'sentry-trace' ] : undefined ;
6657 const baggage = req . headers ?. baggage ;
6758 const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders (
@@ -70,6 +61,10 @@ export function tracingHandler(): (
7061 ) ;
7162 hub . getScope ( ) . setPropagationContext ( propagationContext ) ;
7263
64+ if ( ! hasTracingEnabled ( options ) ) {
65+ return next ( ) ;
66+ }
67+
7368 const [ name , source ] = extractPathForTransaction ( req , { path : true , method : true } ) ;
7469 const transaction = startTransaction (
7570 {
You can’t perform that action at this time.
0 commit comments