diff --git a/packages/browser/src/integrations/breadcrumbs.ts b/packages/browser/src/integrations/breadcrumbs.ts index 8bd51c395cf5..c2d359eee914 100644 --- a/packages/browser/src/integrations/breadcrumbs.ts +++ b/packages/browser/src/integrations/breadcrumbs.ts @@ -153,7 +153,7 @@ export class Breadcrumbs implements Integration { } // We only capture issued sentry requests - if (handlerData.xhr.__sentry_own_request__) { + if (this._options.sentry && handlerData.xhr.__sentry_own_request__) { addSentryBreadcrumb(handlerData.args[0]); } } @@ -169,8 +169,7 @@ export class Breadcrumbs implements Integration { const client = getCurrentHub().getClient(); const dsn = client && client.getDsn(); - - if (dsn) { + if (this._options.sentry && dsn) { const filterUrl = new API(dsn).getStoreEndpoint(); // if Sentry key appears in URL, don't capture it as a request // but rather as our own 'sentry' type breadcrumb