-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathscenario.ts
More file actions
23 lines (20 loc) · 647 Bytes
/
scenario.ts
File metadata and controls
23 lines (20 loc) · 647 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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,
}),
],
});
async function run(): Promise<void> {
// Wait long enough for the collection interval to fire at least once.
await new Promise<void>(resolve => setTimeout(resolve, 1100));
await Sentry.flush();
}
// eslint-disable-next-line @typescript-eslint/no-floating-promises
run();