| 26 | : resolve(RUNS_DIR, "cloud", "server-logs", "boot.log"); |
| 27 | |
| 28 | const optionalCloudEnv = (): Record<string, string> => { |
| 29 | // The Sentry/OTel correlation scenario always runs in this suite, so the |
| 30 | // verification route and beforeSend payload logging default on here; the |
| 31 | // env vars remain overridable for local runs against a different setup. |
| 32 | const env: Record<string, string> = { |
| 33 | SENTRY_OTEL_VERIFY: "true", |
| 34 | SENTRY_OTEL_LOG_PAYLOAD: "true", |
| 35 | // Boot the BROWSER crash reporter too, so what the frontend actually |
| 36 | // reports is observable to a scenario. Production always has this set; |
| 37 | // without it the reporter the app wires into ExecutorProvider is a no-op |
| 38 | // and "the frontend reports nothing at all" looks identical to health. |
| 39 | // Nothing leaves the machine: the SDK is configured with |
| 40 | // `tunnel: "/api/sentry-tunnel"`, so envelopes are POSTed same-origin, |
| 41 | // and that route 204s unless a server-side SENTRY_DSN is configured. |
| 42 | VITE_PUBLIC_SENTRY_DSN: "https://e2epublickey@ingest.e2e.invalid/1", |
| 43 | }; |
| 44 | for (const key of [ |
| 45 | "SENTRY_DSN", |
| 46 | "SENTRY_OTEL_LOG_PAYLOAD", |
| 47 | "SENTRY_OTEL_VERIFY", |
| 48 | "VITE_PUBLIC_SENTRY_DSN", |
| 49 | ]) { |
| 50 | const value = process.env[key]; |
| 51 | if (value) env[key] = value; |
| 52 | } |
| 53 | return env; |
| 54 | }; |
| 55 | |
| 56 | export default async function setup(): Promise<(() => Promise<void>) | void> { |
| 57 | if (process.env.E2E_CLOUD_URL) { |