-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathinit.js
More file actions
28 lines (26 loc) · 693 Bytes
/
init.js
File metadata and controls
28 lines (26 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import * as Sentry from '@sentry/browser';
window.Sentry = Sentry;
Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
integrations: [
Sentry.browserTracingIntegration({
linkPreviousTrace: 'in-memory',
consistentTraceSampling: true,
enableInp: false,
}),
],
tracePropagationTargets: ['sentry-test-external.io'],
tracesSampler: ctx => {
if (ctx.attributes && ctx.attributes['sentry.origin'] === 'auto.pageload.browser') {
return 1;
}
if (ctx.name === 'custom root span 1') {
return 0;
}
if (ctx.name === 'custom root span 2') {
return 1;
}
return ctx.inheritOrSampleWith(0);
},
debug: true,
});