Skip to content

Commit a9fb9d2

Browse files
committed
Narrow down pageload spans to status_code 200
1 parent bc480a4 commit a9fb9d2

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

dev-packages/e2e-tests/test-applications/react-router-7-framework-custom/tests/performance/pageload.client.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { APP_NAME } from '../constants';
55
test.describe('client - pageload performance', () => {
66
test('should send pageload transaction', async ({ page }) => {
77
const txPromise = waitForTransaction(APP_NAME, async transactionEvent => {
8-
return transactionEvent.transaction === '/performance/';
8+
return (
9+
transactionEvent.transaction === '/performance/' && transactionEvent.contexts?.response?.status_code === 200
10+
);
911
});
1012

1113
await page.goto(`/performance`);

dev-packages/e2e-tests/test-applications/react-router-7-framework-node-20-18/tests/performance/pageload.client.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { APP_NAME } from '../constants';
55
test.describe('client - pageload performance', () => {
66
test('should send pageload transaction', async ({ page }) => {
77
const txPromise = waitForTransaction(APP_NAME, async transactionEvent => {
8-
return transactionEvent.transaction === '/performance/';
8+
return (
9+
transactionEvent.transaction === '/performance/' && transactionEvent.contexts?.response?.status_code === 200
10+
);
911
});
1012

1113
await page.goto(`/performance`);

dev-packages/e2e-tests/test-applications/react-router-7-framework/tests/performance/performance.server.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ import { APP_NAME } from '../constants';
55
test.describe('server - performance', () => {
66
test('should send server transaction on pageload', async ({ page }) => {
77
const txPromise = waitForTransaction(APP_NAME, async transactionEvent => {
8-
return transactionEvent.transaction === 'GET /performance';
8+
return (
9+
transactionEvent.transaction === 'GET /performance' && transactionEvent.contexts?.response?.status_code === 200
10+
);
911
});
1012

1113
await page.goto(`/performance`);

0 commit comments

Comments
 (0)