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
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "solidstart-2",
"version": "0.0.0",
"//": "In the build script, the instrument.server.ts file is copied to the .output/server dir. Ideally, this is done in the SDK.",
"//": "Sentry is initialized from server/plugins/sentry.ts, a Nitro plugin. Build-time instrumentation means there is no `--import` preload and nothing to copy into .output.",
"scripts": {
"clean": "pnpx rimraf node_modules pnpm-lock.yaml .nitro .output",
"build": "vite build && cp src/instrument.server.ts .output/server/instrument.server.mjs",
"build": "vite build",
"preview": "HOST=localhost PORT=3030 vite preview",
"start:import": "HOST=localhost PORT=3030 node --import ./.output/server/instrument.server.mjs .output/server/index.mjs",
"start": "HOST=localhost PORT=3030 node .output/server/index.mjs",
"test:prod": "TEST_ENV=production playwright test",
"test:build": "pnpm install && pnpm build",
"test:assert": "pnpm test:prod"
Expand All @@ -21,7 +21,7 @@
"@sentry-internal/test-utils": "link:../../../test-utils",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^1.0.0",
"@solidjs/start": "2.0.0-rc.6",
"@solidjs/start": "2.0.0",
"@solidjs/testing-library": "^0.8.10",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/user-event": "^14.5.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getPlaywrightConfig } from '@sentry-internal/test-utils';

const config = getPlaywrightConfig({
startCommand: 'pnpm start:import',
startCommand: 'pnpm start',
port: 3030,
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import * as Sentry from '@sentry/solidstart';
import { definePlugin } from 'nitro';

// Runs once at server startup. Build-time instrumentation means no `--import` preload is needed.
export default definePlugin(() => {
Sentry.init({
traceLifecycle: 'static',
dsn: process.env.E2E_TEST_DSN,
environment: 'qa', // dynamic sampling bias to keep transactions
tracesSampleRate: 1.0, // Capture 100% of the transactions
tunnel: 'http://localhost:3031/', // proxy server
debug: !!process.env.DEBUG,
});
});

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"jsx": "preserve",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { sentrySolidStart } from '@sentry/solidstart/vite';
import { solidStart } from '@solidjs/start/config';
import { nitro } from 'nitro/vite';
import { defineConfig } from 'vite';
Expand All @@ -8,6 +9,13 @@ export default defineConfig({
appRoot: './src',
middleware: './src/middleware.ts',
}),
nitro(),
sentrySolidStart({
org: process.env.E2E_TEST_SENTRY_ORG_SLUG,
project: process.env.E2E_TEST_SENTRY_PROJECT,
authToken: process.env.E2E_TEST_AUTH_TOKEN,
debug: true,
}),
// `serverDir` defaults to `false`, which skips plugin scanning entirely.
nitro({ serverDir: './server' }),
],
});
Loading