Skip to content

Commit b2907a6

Browse files
committed
Fix bundleSizeOptimizations.excludeTracing
This flag was having no effect - the correct name is __SENTRY_TRACING__, not __SENTRY_TRACE__
1 parent b2a0529 commit b2907a6

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
@@ -255,7 +255,7 @@ export function sentryUnpluginFactory({
255255
bundleSizeOptimizations.excludePerformanceMonitoring ||
256256
bundleSizeOptimizations.excludeTracing
257257
) {
258-
replacementValues["__SENTRY_TRACE__"] = false;
258+
replacementValues["__SENTRY_TRACING__"] = false;
259259
}
260260
if (bundleSizeOptimizations.excludeReplayCanvas) {
261261
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
@@ -498,7 +498,7 @@ export type IncludeEntry = {
498498

499499
export interface SentrySDKBuildFlags extends Record<string, boolean | undefined> {
500500
__SENTRY_DEBUG__?: boolean;
501-
__SENTRY_TRACE__?: boolean;
501+
__SENTRY_TRACING__?: boolean;
502502
__RRWEB_EXCLUDE_CANVAS__?: boolean;
503503
__RRWEB_EXCLUDE_IFRAME__?: boolean;
504504
__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)