Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "effect-browser-test-app",
"name": "effect-3-browser-test-app",
"version": "1.0.0",
"private": true,
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/test-utils';

startEventProxyServer({
port: 3031,
proxyServerName: 'effect-browser',
proxyServerName: 'effect-3-browser',
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForError, waitForTransaction } from '@sentry-internal/test-utils';

test('captures an error', async ({ page }) => {
const errorEventPromise = waitForError('effect-browser', event => {
const errorEventPromise = waitForError('effect-3-browser', event => {
return !event.type && event.exception?.values?.[0]?.value === 'I am an error!';
});

Expand All @@ -29,11 +29,11 @@ test('captures an error', async ({ page }) => {
});

test('sets correct transactionName', async ({ page }) => {
const transactionPromise = waitForTransaction('effect-browser', async transactionEvent => {
const transactionPromise = waitForTransaction('effect-3-browser', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const errorEventPromise = waitForError('effect-browser', event => {
const errorEventPromise = waitForError('effect-3-browser', event => {
return !event.type && event.exception?.values?.[0]?.value === 'I am an error!';
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { waitForEnvelopeItem } from '@sentry-internal/test-utils';
import type { SerializedLogContainer } from '@sentry/core';

test('should send Effect debug logs', async ({ page }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-browser', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-browser', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -26,7 +26,7 @@ test('should send Effect debug logs', async ({ page }) => {
});

test('should send Effect info logs', async ({ page }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-browser', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-browser', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -49,7 +49,7 @@ test('should send Effect info logs', async ({ page }) => {
});

test('should send Effect warning logs', async ({ page }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-browser', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-browser', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -72,7 +72,7 @@ test('should send Effect warning logs', async ({ page }) => {
});

test('should send Effect error logs', async ({ page }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-browser', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-browser', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -95,7 +95,7 @@ test('should send Effect error logs', async ({ page }) => {
});

test('should send Effect logs with context attributes', async ({ page }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-browser', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-browser', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(item => item.body === 'Log with context')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForTransaction } from '@sentry-internal/test-utils';

test('captures a pageload transaction', async ({ page }) => {
const transactionPromise = waitForTransaction('effect-browser', async transactionEvent => {
const transactionPromise = waitForTransaction('effect-3-browser', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

Expand Down Expand Up @@ -49,11 +49,11 @@ test('captures a pageload transaction', async ({ page }) => {
});

test('captures a navigation transaction', async ({ page }) => {
const pageLoadTransactionPromise = waitForTransaction('effect-browser', async transactionEvent => {
const pageLoadTransactionPromise = waitForTransaction('effect-3-browser', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'pageload';
});

const navigationTransactionPromise = waitForTransaction('effect-browser', async transactionEvent => {
const navigationTransactionPromise = waitForTransaction('effect-3-browser', async transactionEvent => {
return !!transactionEvent?.transaction && transactionEvent.contexts?.trace?.op === 'navigation';
});

Expand All @@ -80,11 +80,11 @@ test('captures a navigation transaction', async ({ page }) => {
});

test('captures Effect spans with correct parent-child structure', async ({ page }) => {
const pageloadPromise = waitForTransaction('effect-browser', transactionEvent => {
const pageloadPromise = waitForTransaction('effect-3-browser', transactionEvent => {
return transactionEvent?.contexts?.trace?.op === 'pageload';
});

const transactionPromise = waitForTransaction('effect-browser', transactionEvent => {
const transactionPromise = waitForTransaction('effect-3-browser', transactionEvent => {
return (
transactionEvent?.contexts?.trace?.op === 'ui.action.click' &&
transactionEvent.spans?.some(span => span.description === 'custom-effect-span')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "effect-node-app",
"name": "effect-3-node-app",
"version": "1.0.0",
"private": true,
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { startEventProxyServer } from '@sentry-internal/test-utils';

startEventProxyServer({
port: 3031,
proxyServerName: 'effect-node',
proxyServerName: 'effect-3-node',
});
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForError } from '@sentry-internal/test-utils';

test('Captures manually reported error', async ({ baseURL }) => {
const errorEventPromise = waitForError('effect-node', event => {
const errorEventPromise = waitForError('effect-3-node', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an error';
});

Expand All @@ -17,7 +17,7 @@ test('Captures manually reported error', async ({ baseURL }) => {
});

test('Captures thrown exception', async ({ baseURL }) => {
const errorEventPromise = waitForError('effect-node', event => {
const errorEventPromise = waitForError('effect-3-node', event => {
return !event.type && event.exception?.values?.[0]?.value === 'This is an exception with id 123';
});

Expand All @@ -30,7 +30,7 @@ test('Captures thrown exception', async ({ baseURL }) => {
});

test('Captures Effect.fail as error', async ({ baseURL }) => {
const errorEventPromise = waitForError('effect-node', event => {
const errorEventPromise = waitForError('effect-3-node', event => {
return !event.type && event.exception?.values?.[0]?.value === 'Effect failure';
});

Expand All @@ -43,7 +43,7 @@ test('Captures Effect.fail as error', async ({ baseURL }) => {
});

test('Captures Effect.die as error', async ({ baseURL }) => {
const errorEventPromise = waitForError('effect-node', event => {
const errorEventPromise = waitForError('effect-3-node', event => {
return !event.type && event.exception?.values?.[0]?.value?.includes('Effect defect');
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { waitForEnvelopeItem } from '@sentry-internal/test-utils';
import type { SerializedLogContainer } from '@sentry/core';

test('should send Effect debug logs', async ({ baseURL }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-node', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-node', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -22,7 +22,7 @@ test('should send Effect debug logs', async ({ baseURL }) => {
});

test('should send Effect info logs', async ({ baseURL }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-node', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-node', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -41,7 +41,7 @@ test('should send Effect info logs', async ({ baseURL }) => {
});

test('should send Effect warning logs', async ({ baseURL }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-node', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-node', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -60,7 +60,7 @@ test('should send Effect warning logs', async ({ baseURL }) => {
});

test('should send Effect error logs', async ({ baseURL }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-node', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-node', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(
Expand All @@ -79,7 +79,7 @@ test('should send Effect error logs', async ({ baseURL }) => {
});

test('should send Effect logs with context attributes', async ({ baseURL }) => {
const logEnvelopePromise = waitForEnvelopeItem('effect-node', envelope => {
const logEnvelopePromise = waitForEnvelopeItem('effect-3-node', envelope => {
return (
envelope[0].type === 'log' &&
(envelope[1] as SerializedLogContainer).items.some(item => item.body === 'Log with context')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { expect, test } from '@playwright/test';
import { waitForTransaction } from '@sentry-internal/test-utils';

test('Sends an HTTP transaction', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('effect-node', transactionEvent => {
const transactionEventPromise = waitForTransaction('effect-3-node', transactionEvent => {
return transactionEvent?.transaction === 'http.server GET';
});

Expand All @@ -14,7 +14,7 @@ test('Sends an HTTP transaction', async ({ baseURL }) => {
});

test('Sends transaction with manual Effect span', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('effect-node', transactionEvent => {
const transactionEventPromise = waitForTransaction('effect-3-node', transactionEvent => {
return (
transactionEvent?.transaction === 'http.server GET' &&
transactionEvent?.spans?.some(span => span.description === 'test-span')
Expand All @@ -36,7 +36,7 @@ test('Sends transaction with manual Effect span', async ({ baseURL }) => {
});

test('Sends Effect spans with correct parent-child structure', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('effect-node', transactionEvent => {
const transactionEventPromise = waitForTransaction('effect-3-node', transactionEvent => {
return (
transactionEvent?.transaction === 'http.server GET' &&
transactionEvent?.spans?.some(span => span.description === 'custom-effect-span')
Expand Down Expand Up @@ -87,7 +87,7 @@ test('Sends Effect spans with correct parent-child structure', async ({ baseURL
});

test('Sends transaction for error route', async ({ baseURL }) => {
const transactionEventPromise = waitForTransaction('effect-node', transactionEvent => {
const transactionEventPromise = waitForTransaction('effect-3-node', transactionEvent => {
return transactionEvent?.transaction === 'http.server GET';
});

Expand Down
Loading