-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathscenario-opt-out.ts
More file actions
30 lines (27 loc) · 783 Bytes
/
scenario-opt-out.ts
File metadata and controls
30 lines (27 loc) · 783 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
29
30
import * as Sentry from '@sentry/node';
import { loggingTransport } from '@sentry-internal/node-integration-tests';
Sentry.init({
dsn: 'https://public@dsn.ingest.sentry.io/1337',
release: '1.0.0',
environment: 'test',
transport: loggingTransport,
integrations: [
Sentry.nodeRuntimeMetricsIntegration({
collectionIntervalMs: 1000,
collect: {
cpuUtilization: false,
cpuTime: false,
eventLoopDelayP50: false,
eventLoopDelayP99: false,
eventLoopUtilization: false,
uptime: false,
},
}),
],
});
async function run(): Promise<void> {
await new Promise<void>(resolve => setTimeout(resolve, 1100));
await Sentry.flush();
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run();