File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
packages/node-core/src/integrations/http Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,9 @@ import { DEBUG_BUILD } from '../../debug-build';
3636import type { NodeClient } from '../../sdk/client' ;
3737import { INSTRUMENTATION_NAME , MAX_BODY_BYTE_LENGTH } from './constants' ;
3838
39+ // Tree-shakable guard to remove all code related to tracing
40+ declare const __SENTRY_TRACING__ : boolean ;
41+
3942type ServerEmit = typeof Server . prototype . emit ;
4043
4144const HTTP_SERVER_INSTRUMENTED_KEY = createContextKey ( 'sentry_http_server_instrumented' ) ;
@@ -164,6 +167,7 @@ export function instrumentServer(
164167 return context . with ( ctx , ( ) => {
165168 // if opting out of span creation, we can end here
166169 if (
170+ ( typeof __SENTRY_TRACING__ !== 'undefined' && ! __SENTRY_TRACING__ ) ||
167171 ! spans ||
168172 ! client ||
169173 shouldIgnoreSpansForIncomingRequest ( request , {
You can’t perform that action at this time.
0 commit comments