From fc371fe9de192071a7ee43155b3e1c6f040b5763 Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Wed, 9 Mar 2022 05:00:03 -0800 Subject: [PATCH 1/2] only emit BrowserTracing options warning in debug bundles --- packages/tracing/src/browser/browsertracing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tracing/src/browser/browsertracing.ts b/packages/tracing/src/browser/browsertracing.ts index 463d67c9d1d6..7b8ae8da098b 100644 --- a/packages/tracing/src/browser/browsertracing.ts +++ b/packages/tracing/src/browser/browsertracing.ts @@ -139,7 +139,7 @@ export class BrowserTracing implements Integration { if (_options.tracingOrigins && Array.isArray(_options.tracingOrigins) && _options.tracingOrigins.length !== 0) { tracingOrigins = _options.tracingOrigins; } else { - this._emitOptionsWarning = true; + isDebugBuild() && (this._emitOptionsWarning = true); } } From 197acf23e811839219ff9531f022b060b246eb4f Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Fri, 11 Mar 2022 11:23:12 -0800 Subject: [PATCH 2/2] default logging flag to undefined --- packages/tracing/src/browser/browsertracing.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tracing/src/browser/browsertracing.ts b/packages/tracing/src/browser/browsertracing.ts index 7b8ae8da098b..0b5b8be40b0e 100644 --- a/packages/tracing/src/browser/browsertracing.ts +++ b/packages/tracing/src/browser/browsertracing.ts @@ -126,7 +126,7 @@ export class BrowserTracing implements Integration { private readonly _metrics: MetricsInstrumentation; - private readonly _emitOptionsWarning: boolean = false; + private readonly _emitOptionsWarning?: boolean; /** Store configured idle timeout so that it can be added as a tag to transactions */ private _configuredIdleTimeout: BrowserTracingOptions['idleTimeout'] | undefined = undefined;