Skip to content

Commit 5897454

Browse files
author
Luca Forstner
authored
test(e2e): Send qa environment to avoid transacitons from being dynamically sampled (#8027)
1 parent 86f7cdf commit 5897454

File tree

12 files changed

+23
-13
lines changed

12 files changed

+23
-13
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -783,19 +783,18 @@ jobs:
783783
id: versions
784784
run: |
785785
echo "echo node=$(jq -r '.volta.node' package.json)" >> $GITHUB_OUTPUT
786-
# Temporarily disabling e2e tests
787-
# - name: Run E2E tests
788-
# env:
789-
# E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
790-
# E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
791-
# E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
792-
# E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
793-
# E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
794-
# E2E_TEST_SHARD: ${{ matrix.shard }}
795-
# E2E_TEST_SHARD_AMOUNT: 3
796-
# run: |
797-
# cd packages/e2e-tests
798-
# yarn test:e2e
786+
- name: Run E2E tests
787+
env:
788+
E2E_TEST_PUBLISH_SCRIPT_NODE_VERSION: ${{ steps.versions.outputs.node }}
789+
E2E_TEST_AUTH_TOKEN: ${{ secrets.E2E_TEST_AUTH_TOKEN }}
790+
E2E_TEST_DSN: ${{ secrets.E2E_TEST_DSN }}
791+
E2E_TEST_SENTRY_ORG_SLUG: 'sentry-javascript-sdks'
792+
E2E_TEST_SENTRY_TEST_PROJECT: 'sentry-javascript-e2e-tests'
793+
E2E_TEST_SHARD: ${{ matrix.shard }}
794+
E2E_TEST_SHARD_AMOUNT: 3
795+
run: |
796+
cd packages/e2e-tests
797+
yarn test:e2e
799798
800799
job_required_tests:
801800
name: All required tests passed or skipped

packages/e2e-tests/test-applications/create-next-app/sentry.client.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import * as Sentry from '@sentry/nextjs';
66

77
Sentry.init({
8+
environment: 'qa', // dynamic sampling bias to keep transactions
89
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
910
// Adjust this value in production, or use tracesSampler for greater control
1011
tracesSampleRate: 1.0,

packages/e2e-tests/test-applications/create-next-app/sentry.server.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ declare global {
1111
}
1212

1313
Sentry.init({
14+
environment: 'qa', // dynamic sampling bias to keep transactions
1415
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
1516
// Adjust this value in production, or use tracesSampler for greater control
1617
tracesSampleRate: 1.0,

packages/e2e-tests/test-applications/create-react-app/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as Sentry from '@sentry/react';
77
import { BrowserTracing } from '@sentry/tracing';
88

99
Sentry.init({
10+
environment: 'qa', // dynamic sampling bias to keep transactions
1011
dsn: 'https://[email protected]/1337',
1112
integrations: [new BrowserTracing()],
1213

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.client.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as Sentry from '@sentry/nextjs';
22

33
Sentry.init({
4+
environment: 'qa', // dynamic sampling bias to keep transactions
45
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
56
tunnel: `http://localhost:${
67
Number(process.env.NEXT_PUBLIC_BASE_PORT) +

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.edge.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as Sentry from '@sentry/nextjs';
22

33
Sentry.init({
4+
environment: 'qa', // dynamic sampling bias to keep transactions
45
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
56
tunnel: `http://localhost:${
67
Number(process.env.NEXT_PUBLIC_BASE_PORT) +

packages/e2e-tests/test-applications/nextjs-app-dir/sentry.server.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as Sentry from '@sentry/nextjs';
22

33
Sentry.init({
4+
environment: 'qa', // dynamic sampling bias to keep transactions
45
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
56
tunnel: `http://localhost:${
67
Number(process.env.NEXT_PUBLIC_BASE_PORT) +

packages/e2e-tests/test-applications/node-express-app/src/app.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ declare global {
1010
}
1111

1212
Sentry.init({
13+
environment: 'qa', // dynamic sampling bias to keep transactions
1314
dsn: process.env.NEXT_PUBLIC_E2E_TEST_DSN,
1415
integrations: [new Integrations.HttpClient()],
1516
debug: true,

packages/e2e-tests/test-applications/standard-frontend-react-tracing-import/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import Index from './pages/Index';
1515
import User from './pages/User';
1616

1717
Sentry.init({
18+
environment: 'qa', // dynamic sampling bias to keep transactions
1819
dsn: process.env.REACT_APP_E2E_TEST_DSN,
1920
integrations: [
2021
new BrowserTracing({

packages/e2e-tests/test-applications/standard-frontend-react/src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import User from './pages/User';
1616
const replay = new Sentry.Replay();
1717

1818
Sentry.init({
19+
environment: 'qa', // dynamic sampling bias to keep transactions
1920
dsn: process.env.REACT_APP_E2E_TEST_DSN,
2021
integrations: [
2122
new Sentry.BrowserTracing({

packages/e2e-tests/test-applications/sveltekit/src/hooks.client.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { env } from '$env/dynamic/public';
22
import * as Sentry from '@sentry/sveltekit';
33

44
Sentry.init({
5+
environment: 'qa', // dynamic sampling bias to keep transactions
56
dsn: env.PUBLIC_E2E_TEST_DSN,
67
debug: true,
78
tunnel: `http://localhost:${

packages/e2e-tests/test-applications/sveltekit/src/hooks.server.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { env } from '$env/dynamic/private';
22
import * as Sentry from '@sentry/sveltekit';
33

44
Sentry.init({
5+
environment: 'qa', // dynamic sampling bias to keep transactions
56
dsn: env.E2E_TEST_DSN,
67
debug: true,
78
tunnel: `http://localhost:${Number(env.BASE_PORT) + Number(env.PORT_MODULO) + Number(env.PORT_GAP)}/`, // proxy server

0 commit comments

Comments
 (0)