Skip to content

Commit 7a7c1ed

Browse files
committed
ref(node): Streamline check for adding performance integrations
1 parent aaf7d53 commit 7a7c1ed

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)