From 7a7c1ed6d12d6891d10a6ec5680d16d8580abd75 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 15 Jan 2025 09:10:14 +0100 Subject: [PATCH] ref(node): Streamline check for adding performance integrations --- packages/node/src/sdk/index.ts | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/packages/node/src/sdk/index.ts b/packages/node/src/sdk/index.ts index 9d3ea3cb9fed..a741b4b43f80 100644 --- a/packages/node/src/sdk/index.ts +++ b/packages/node/src/sdk/index.ts @@ -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. */