File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -78,10 +78,23 @@ export function getDefaultIntegrationsWithoutPerformance(): Integration[] {
7878export function getDefaultIntegrations ( options : Options ) : Integration [ ] {
7979 return [
8080 ...getDefaultIntegrationsWithoutPerformance ( ) ,
81- ...( hasTracingEnabled ( options ) ? getAutoPerformanceIntegrations ( ) : [ ] ) ,
81+ // We only add performance integrations if tracing is enabled
82+ // Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added
83+ // This means that generally request isolation will work (because that is done by httpIntegration)
84+ // But `transactionName` will not be set automatically
85+ ...( shouldAddPerformanceIntegrations ( options ) ? getAutoPerformanceIntegrations ( ) : [ ] ) ,
8286 ] ;
8387}
8488
89+ function shouldAddPerformanceIntegrations ( options : Options ) : boolean {
90+ if ( ! hasTracingEnabled ( options ) ) {
91+ return false ;
92+ }
93+
94+ // We want to ensure `tracesSampleRate` is not just undefined/null here
95+ return options . enableTracing || options . tracesSampleRate != null || 'tracesSampler' in options ;
96+ }
97+
8598declare const __IMPORT_META_URL_REPLACEMENT__ : string ;
8699
87100/**
You can’t perform that action at this time.
0 commit comments