Skip to content
Merged
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
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,8 @@
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
},
"oxc.suppressProgramErrors": true
"oxc.suppressProgramErrors": true,
"[typescriptreact]": {
"editor.defaultFormatter": "oxc.oxc-vscode"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"build:no-sentry": "vite build --mode no-sentry",
"build:init-only": "vite build --mode init-only",
"build:errors-only": "vite build --mode errors-only",
"build:no-integrations": "vite build --mode no-integrations",
"build:no-browser-api-errors": "vite build --mode no-browser-api-errors",
"build:tracing": "vite build --mode tracing",
"build:tracing-replay": "vite build --mode tracing-replay",
"preview": "vite preview",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,27 @@ if (import.meta.env.MODE === 'tracing-replay') {
release: 'lighthouse-fixture',
environment: 'qa',
});
} else if (import.meta.env.MODE === 'no-integrations') {
// DSN set but every integration disabled. Isolates the cost of the enabled
// client itself from the default instrumentation that wraps DOM/timer/network APIs.
Sentry.init({
dsn: import.meta.env.VITE_E2E_TEST_DSN as string | undefined,
release: 'lighthouse-fixture',
environment: 'qa',
defaultIntegrations: false,
integrations: [],
});
} else if (import.meta.env.MODE === 'no-browser-api-errors') {
// Default integrations minus BrowserApiErrors, which wraps addEventListener/
// removeEventListener on ~32 prototypes plus setTimeout/setInterval/rAF/XHR.
// Isolates that global monkey-patching cost from the rest of the defaults.
Sentry.init({
dsn: import.meta.env.VITE_E2E_TEST_DSN as string | undefined,
release: 'lighthouse-fixture',
environment: 'qa',
integrations: defaultIntegrations =>
defaultIntegrations.filter(integration => integration.name !== 'BrowserApiErrors'),
});
} else if (import.meta.env.MODE === 'init-only') {
// enabled: false makes the SDK a guaranteed no-op (no transport allocation,
// no DSN warning). We're measuring pure SDK-loading + tree-shaking cost.
Expand Down
21 changes: 15 additions & 6 deletions scripts/lighthouse-bundle-and-upload.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/**
* Bundle the `lighthouse-react` test app for each mode (no-sentry, init-only,
* errors-only, tracing, tracing-replay) and POST the tarballs to the Sentry
* Lighthouse lab (https://lighthouse.sentry.gg). The lab runs Lighthouse
* asynchronously and ships results to Sentry on its own schedule — this script
* exits as soon as the upload succeeds.
* errors-only, no-integrations, no-browser-api-errors, tracing, tracing-replay)
* and POST the tarballs to the Sentry Lighthouse lab
* (https://lighthouse.sentry.gg). The lab runs Lighthouse asynchronously and
* ships results to Sentry on its own schedule — this script exits as soon as
* the upload succeeds.
*
* Single-app static matrix: 1 app × 5 modes = 5 cells.
* Single-app static matrix: 1 app × 7 modes = 7 cells.
*
* Zero runtime dependencies — uses Node 22 builtins (fetch, FormData, Blob) and
* the system `tar`. Every external command is invoked via `execFileSync` with
Expand Down Expand Up @@ -33,7 +34,15 @@ const E2E_DIR = path.join(WORKSPACE, 'dev-packages/e2e-tests');

const APP = 'lighthouse-react';
const APP_DIR = 'lighthouse-react';
const MODES = ['no-sentry', 'init-only', 'errors-only', 'tracing', 'tracing-replay'];
const MODES = [
'no-sentry',
'init-only',
'errors-only',
'no-integrations',
'no-browser-api-errors',
'tracing',
'tracing-replay',
];
const STATIC_DIR = 'dist';

async function run() {
Expand Down
Loading