From 08d44c4e82d55b997d900e1ccda38587b0327076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Og=C3=B3rek?= Date: Mon, 16 Mar 2020 13:42:20 +0100 Subject: [PATCH] fix: Respect breadcrumbs sentry:false option --- packages/browser/src/integrations/breadcrumbs.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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