Skip to content

Commit

Permalink
Set up shouldCreateSpanForRequest option for sentry `browserTracing…
Browse files Browse the repository at this point in the history
…Integration` and filter spans for requests to 'sentry.io'
  • Loading branch information
MajorLift committed Nov 21, 2024
1 parent f455a6e commit 9142f93
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ function getClientOptions() {
integrations: [
Sentry.dedupeIntegration(),
Sentry.extraErrorDataIntegration(),
Sentry.browserTracingIntegration(),
Sentry.browserTracingIntegration({
shouldCreateSpanForRequest: (url) => {
// Do not create spans for outgoing requests to a 'sentry.io' domain.
return !url.match(/sentry\.io\/?$/u);
},
}),
filterEvents({ getMetaMetricsEnabled, log }),
],
release: RELEASE,
Expand Down

0 comments on commit 9142f93

Please sign in to comment.