Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions packages/node/src/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,10 @@ export function getDefaultIntegrations(options: Options): Integration[] {
// Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added
// This means that generally request isolation will work (because that is done by httpIntegration)
// But `transactionName` will not be set automatically
...(shouldAddPerformanceIntegrations(options) ? getAutoPerformanceIntegrations() : []),
...(hasTracingEnabled(options) ? getAutoPerformanceIntegrations() : []),
];
}

function shouldAddPerformanceIntegrations(options: Options): boolean {
if (!hasTracingEnabled(options)) {
return false;
}

// We want to ensure `tracesSampleRate` is not just undefined/null here
// eslint-disable-next-line deprecation/deprecation
return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options;
}

/**
* Initialize Sentry for Node.
*/
Expand Down
Loading