Skip to content

Commit

Permalink
fix: Respect breadcrumbs sentry:false option
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilogorek committed Mar 16, 2020
1 parent 81732c5 commit 08d44c4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/browser/src/integrations/breadcrumbs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
}
Expand All @@ -169,8 +169,7 @@ export class Breadcrumbs implements Integration {

const client = getCurrentHub().getClient<BrowserClient>();
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
Expand Down

0 comments on commit 08d44c4

Please sign in to comment.