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[] {
78
78
export function getDefaultIntegrations ( options : Options ) : Integration [ ] {
79
79
return [
80
80
...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 ( ) : [ ] ) ,
82
86
] ;
83
87
}
84
88
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
+
85
98
declare const __IMPORT_META_URL_REPLACEMENT__ : string ;
86
99
87
100
/**
You can’t perform that action at this time.
0 commit comments