Skip to content

Commit 74a42d8

Browse files
authored
feat: update sentry (#780)
* feat: update sentry * fix: move monitoring closer to server to fix build and fix env variables
1 parent 1e8c186 commit 74a42d8

File tree

5 files changed

+421
-331
lines changed

5 files changed

+421
-331
lines changed

app/entry.server.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ const ABORT_DELAY = 5000
2020
init()
2121
global.ENV = getEnv()
2222

23-
if (ENV.MODE === 'production' && ENV.SENTRY_DSN) {
24-
import('./utils/monitoring.server.ts').then(({ init }) => init())
25-
}
26-
2723
type DocRequestArgs = Parameters<HandleDocumentRequestFunction>
2824

2925
export default async function handleRequest(...args: DocRequestArgs) {
@@ -103,7 +99,7 @@ export function handleError(
10399
}
104100
if (error instanceof Error) {
105101
console.error(chalk.red(error.stack))
106-
Sentry.captureRemixServerException(error, 'remix.server', request)
102+
Sentry.captureRemixServerException(error, 'remix.server', request, true)
107103
} else {
108104
console.error(chalk.red(error))
109105
Sentry.captureException(error)

0 commit comments

Comments
 (0)