Skip to content

Commit 23e9851

Browse files
committed
test(deno e2e): fix waitForTransaction filters for root spans\n\nRoot spans are represented by the transaction itself and not included in event.spans. Update filters to match on event.transaction for Sentry.startSpan and interop tests to prevent timeouts.\n\nCo-Authored-By: GPT-5 <noreply@anthropic.com>
1 parent 0f123f8 commit 23e9851

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dev-packages/e2e-tests/test-applications/deno/tests/transactions.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { waitForTransaction } from '@sentry-internal/test-utils';
33

44
test('Sends transaction with Sentry.startSpan', async ({ baseURL }) => {
55
const transactionPromise = waitForTransaction('deno', event => {
6-
return event?.spans?.some(span => span.description === 'test-sentry-span') ?? false;
6+
return event?.transaction === 'test-sentry-span';
77
});
88

99
await fetch(`${baseURL}/test-sentry-span`);
@@ -62,7 +62,7 @@ test('Sends transaction with OTel tracer.startActiveSpan', async ({ baseURL }) =
6262

6363
test('OTel span appears as child of Sentry span (interop)', async ({ baseURL }) => {
6464
const transactionPromise = waitForTransaction('deno', event => {
65-
return event?.spans?.some(span => span.description === 'sentry-parent') ?? false;
65+
return event?.transaction === 'sentry-parent';
6666
});
6767

6868
await fetch(`${baseURL}/test-interop`);

0 commit comments

Comments
 (0)