Skip to content

Commit 57ad14f

Browse files
jdelStrotherlforst
andauthored
fix: Use correct replacement matcher for bundleSizeOptimizations.excludeTracing (#644)
Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
1 parent 8eb6c5f commit 57ad14f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/bundler-plugin-core/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ export function sentryUnpluginFactory({
248248
replacementValues["__SENTRY_DEBUG__"] = false;
249249
}
250250
if (bundleSizeOptimizations.excludeTracing) {
251-
replacementValues["__SENTRY_TRACE__"] = false;
251+
replacementValues["__SENTRY_TRACING__"] = false;
252252
}
253253
if (bundleSizeOptimizations.excludeReplayCanvas) {
254254
replacementValues["__RRWEB_EXCLUDE_CANVAS__"] = true;

packages/bundler-plugin-core/src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ export type IncludeEntry = {
447447

448448
export interface SentrySDKBuildFlags extends Record<string, boolean | undefined> {
449449
__SENTRY_DEBUG__?: boolean;
450-
__SENTRY_TRACE__?: boolean;
450+
__SENTRY_TRACING__?: boolean;
451451
__RRWEB_EXCLUDE_CANVAS__?: boolean;
452452
__RRWEB_EXCLUDE_IFRAME__?: boolean;
453453
__RRWEB_EXCLUDE_SHADOW_DOM__?: boolean;

packages/integration-tests/fixtures/bundle-size-optimizations/input/bundle2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
console.log({
22
debug: __SENTRY_DEBUG__ ? "a" : "b",
3-
trace: __SENTRY_TRACE__ ? "a" : "b",
3+
trace: __SENTRY_TRACING__ ? "a" : "b",
44
replayCanvas: __RRWEB_EXCLUDE_CANVAS__ ? "a" : "b",
55
replayIframe: __RRWEB_EXCLUDE_IFRAME__ ? "a" : "b",
66
replayShadowDom: __RRWEB_EXCLUDE_SHADOW_DOM__ ? "a" : "b",

0 commit comments

Comments
 (0)