Add local dev Sentry DSN support and fix environment tag for test vs. production
Continuous Integration / config (pull_request) Successful in 9s
Continuous Integration / prepare (pull_request) Successful in 1m13s
Continuous Integration / build (pull_request) Successful in 1m57s
Continuous Integration / test (pull_request) Successful in 1m47s
Continuous Integration / deploy-test (pull_request) Skipped
Continuous Integration / config (pull_request) Successful in 9s
Continuous Integration / prepare (pull_request) Successful in 1m13s
Continuous Integration / build (pull_request) Successful in 1m57s
Continuous Integration / test (pull_request) Successful in 1m47s
Continuous Integration / deploy-test (pull_request) Skipped
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
+4
-1
@@ -10,7 +10,10 @@ const sentryDsn = import.meta.env.VITE_SENTRY_DSN;
|
||||
if (sentryDsn) {
|
||||
Sentry.init({
|
||||
dsn: sentryDsn,
|
||||
environment: import.meta.env.MODE,
|
||||
// VITE_APP_ENV ('test' | 'production') distinguishes test vs. production builds — both use
|
||||
// `vite build` without an explicit mode, so MODE alone would tag both as 'production'.
|
||||
// Falls back to MODE for local development (`pnpm dev` -> 'development').
|
||||
environment: import.meta.env.VITE_APP_ENV ?? import.meta.env.MODE,
|
||||
release: __APP_VERSION__,
|
||||
integrations: [Sentry.tanstackRouterBrowserTracingIntegration(router)],
|
||||
// Low-traffic marketing site: capture all traces (lower this if traffic grows significantly).
|
||||
|
||||
Reference in New Issue
Block a user