-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
/
Copy pathinit.js
39 lines (34 loc) · 843 Bytes
/
init.js
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
29
30
31
32
33
34
35
36
37
38
39
import {
BrowserClient,
Scope,
breadcrumbsIntegration,
dedupeIntegration,
defaultStackParser,
functionToStringIntegration,
httpContextIntegration,
eventFiltersIntegration,
linkedErrorsIntegration,
makeFetchTransport,
} from '@sentry/browser';
const integrations = [
breadcrumbsIntegration(),
functionToStringIntegration(),
dedupeIntegration(),
httpContextIntegration(),
eventFiltersIntegration(),
linkedErrorsIntegration(),
];
const client = new BrowserClient({
dsn: 'https://[email protected]/1337',
release: '0.0.1',
environment: 'local',
sampleRate: 1.0,
tracesSampleRate: 0.0,
transport: makeFetchTransport,
stackParser: defaultStackParser,
integrations,
});
const scope = new Scope();
scope.setClient(client);
client.init();
scope.captureException(new Error('test client'));