Skip to content

Commit

Permalink
fix: Use correct replacement matcher for `bundleSizeOptimizations.exc…
Browse files Browse the repository at this point in the history
…ludeTracing` (#644)

Co-authored-by: Luca Forstner <luca.forstner@sentry.io>
  • Loading branch information
jdelStrother and lforst authored Jan 15, 2025
1 parent 8eb6c5f commit 57ad14f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export function sentryUnpluginFactory({
replacementValues["__SENTRY_DEBUG__"] = false;
}
if (bundleSizeOptimizations.excludeTracing) {
replacementValues["__SENTRY_TRACE__"] = false;
replacementValues["__SENTRY_TRACING__"] = false;
}
if (bundleSizeOptimizations.excludeReplayCanvas) {
replacementValues["__RRWEB_EXCLUDE_CANVAS__"] = true;
Expand Down
2 changes: 1 addition & 1 deletion packages/bundler-plugin-core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ export type IncludeEntry = {

export interface SentrySDKBuildFlags extends Record<string, boolean | undefined> {
__SENTRY_DEBUG__?: boolean;
__SENTRY_TRACE__?: boolean;
__SENTRY_TRACING__?: boolean;
__RRWEB_EXCLUDE_CANVAS__?: boolean;
__RRWEB_EXCLUDE_IFRAME__?: boolean;
__RRWEB_EXCLUDE_SHADOW_DOM__?: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 57ad14f

Please sign in to comment.