From b2907a69547ac6c77437566ddaba0199bd280196 Mon Sep 17 00:00:00 2001 From: Jonathan del Strother Date: Mon, 6 Jan 2025 15:31:10 +0000 Subject: [PATCH 1/2] Fix bundleSizeOptimizations.excludeTracing This flag was having no effect - the correct name is __SENTRY_TRACING__, not __SENTRY_TRACE__ --- packages/bundler-plugin-core/src/index.ts | 2 +- packages/bundler-plugin-core/src/types.ts | 2 +- .../fixtures/bundle-size-optimizations/input/bundle2.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/bundler-plugin-core/src/index.ts b/packages/bundler-plugin-core/src/index.ts index 1a0dd7c1..891c3443 100644 --- a/packages/bundler-plugin-core/src/index.ts +++ b/packages/bundler-plugin-core/src/index.ts @@ -255,7 +255,7 @@ export function sentryUnpluginFactory({ bundleSizeOptimizations.excludePerformanceMonitoring || bundleSizeOptimizations.excludeTracing ) { - replacementValues["__SENTRY_TRACE__"] = false; + replacementValues["__SENTRY_TRACING__"] = false; } if (bundleSizeOptimizations.excludeReplayCanvas) { replacementValues["__RRWEB_EXCLUDE_CANVAS__"] = true; diff --git a/packages/bundler-plugin-core/src/types.ts b/packages/bundler-plugin-core/src/types.ts index c42e5b10..79f42439 100644 --- a/packages/bundler-plugin-core/src/types.ts +++ b/packages/bundler-plugin-core/src/types.ts @@ -498,7 +498,7 @@ export type IncludeEntry = { export interface SentrySDKBuildFlags extends Record { __SENTRY_DEBUG__?: boolean; - __SENTRY_TRACE__?: boolean; + __SENTRY_TRACING__?: boolean; __RRWEB_EXCLUDE_CANVAS__?: boolean; __RRWEB_EXCLUDE_IFRAME__?: boolean; __RRWEB_EXCLUDE_SHADOW_DOM__?: boolean; diff --git a/packages/integration-tests/fixtures/bundle-size-optimizations/input/bundle2.js b/packages/integration-tests/fixtures/bundle-size-optimizations/input/bundle2.js index e6c49f94..ac85947c 100644 --- a/packages/integration-tests/fixtures/bundle-size-optimizations/input/bundle2.js +++ b/packages/integration-tests/fixtures/bundle-size-optimizations/input/bundle2.js @@ -1,6 +1,6 @@ console.log({ debug: __SENTRY_DEBUG__ ? "a" : "b", - trace: __SENTRY_TRACE__ ? "a" : "b", + trace: __SENTRY_TRACING__ ? "a" : "b", replayCanvas: __RRWEB_EXCLUDE_CANVAS__ ? "a" : "b", replayIframe: __RRWEB_EXCLUDE_IFRAME__ ? "a" : "b", replayShadowDom: __RRWEB_EXCLUDE_SHADOW_DOM__ ? "a" : "b", From e5d5fb2aeb53539d45a9eb5406cabb651524c4e3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 15 Jan 2025 09:12:05 +0100 Subject: [PATCH 2/2] nudge ci?