first commit
This commit is contained in:
17
instrument.server.mjs
Normal file
17
instrument.server.mjs
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as Sentry from '@sentry/tanstackstart-react'
|
||||
|
||||
const sentryDsn = import.meta.env?.VITE_SENTRY_DSN ?? process.env.VITE_SENTRY_DSN
|
||||
|
||||
if (!sentryDsn) {
|
||||
console.warn('VITE_SENTRY_DSN is not defined. Sentry is not running.')
|
||||
} else {
|
||||
Sentry.init({
|
||||
dsn: sentryDsn,
|
||||
// Adds request headers and IP for users, for more info visit:
|
||||
// https://docs.sentry.io/platforms/javascript/guides/tanstackstart-react/configuration/options/#sendDefaultPii
|
||||
sendDefaultPii: true,
|
||||
tracesSampleRate: 1.0,
|
||||
replaysSessionSampleRate: 1.0,
|
||||
replaysOnErrorSampleRate: 1.0,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user