Skip to content

Commit 18ecd7b

Browse files
committed
Add a manual tracing test.
1 parent b904c98 commit 18ecd7b

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2+
import '@sentry/tracing';
3+
4+
import * as Sentry from '@sentry/node';
5+
6+
Sentry.init({
7+
dsn: 'https://[email protected]/1337',
8+
release: '1.0',
9+
tracesSampleRate: 1.0,
10+
});
11+
12+
const transaction = Sentry.startTransaction({ name: 'test_transaction_1' });
13+
14+
transaction.finish();
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { assertSentryTransaction, getEnvelopeRequest, runServer } from '../../../utils';
2+
3+
test('should send a manually started transaction.', async () => {
4+
const url = await runServer(__dirname);
5+
const envelopeItem = await getEnvelopeRequest(url);
6+
7+
assertSentryTransaction(envelopeItem, {
8+
transaction: 'test_transaction_1',
9+
});
10+
});

0 commit comments

Comments
 (0)