Skip to content

Commit 4ed0e69

Browse files
authored
ref(node): Streamline check for adding performance integrations (#15021)
Noticed that we had this check which is redundant since we changed the `hasTracingEnabled` behavior.
1 parent 5e5bd44 commit 4ed0e69

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

packages/node/src/sdk/index.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,10 @@ export function getDefaultIntegrations(options: Options): Integration[] {
8181
// Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added
8282
// This means that generally request isolation will work (because that is done by httpIntegration)
8383
// But `transactionName` will not be set automatically
84-
...(shouldAddPerformanceIntegrations(options) ? getAutoPerformanceIntegrations() : []),
84+
...(hasTracingEnabled(options) ? getAutoPerformanceIntegrations() : []),
8585
];
8686
}
8787

88-
function shouldAddPerformanceIntegrations(options: Options): boolean {
89-
if (!hasTracingEnabled(options)) {
90-
return false;
91-
}
92-
93-
// We want to ensure `tracesSampleRate` is not just undefined/null here
94-
// eslint-disable-next-line deprecation/deprecation
95-
return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options;
96-
}
97-
9888
/**
9989
* Initialize Sentry for Node.
10090
*/

0 commit comments

Comments
 (0)