Skip to content

Commit 39af3b4

Browse files
authored
fix: Respect breadcrumbs sentry:false option (getsentry#2499)
1 parent 49142c1 commit 39af3b4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/browser/src/integrations/breadcrumbs.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export class Breadcrumbs implements Integration {
153153
}
154154

155155
// We only capture issued sentry requests
156-
if (handlerData.xhr.__sentry_own_request__) {
156+
if (this._options.sentry && handlerData.xhr.__sentry_own_request__) {
157157
addSentryBreadcrumb(handlerData.args[0]);
158158
}
159159
}
@@ -169,8 +169,7 @@ export class Breadcrumbs implements Integration {
169169

170170
const client = getCurrentHub().getClient<BrowserClient>();
171171
const dsn = client && client.getDsn();
172-
173-
if (dsn) {
172+
if (this._options.sentry && dsn) {
174173
const filterUrl = new API(dsn).getStoreEndpoint();
175174
// if Sentry key appears in URL, don't capture it as a request
176175
// but rather as our own 'sentry' type breadcrumb

0 commit comments

Comments
 (0)