Skip to content

Commit 53a7618

Browse files
authored
Updating Sentry Example (#22)
Updating Sentry example with the following * Isomorphic function for initialization * Client / Server Error monitoring across example app * Client / Server Tracing * Session Replay functionality * Theme updates for Sentry example
1 parent 3c62eb2 commit 53a7618

File tree

6 files changed

+511
-33
lines changed

6 files changed

+511
-33
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { createIsomorphicFn } from '@tanstack/start'
2+
import * as Sentry from "@sentry/react";
3+
import * as SentryServer from "@sentry/node";
4+
5+
createIsomorphicFn().server(() => {
6+
console.log('Sentry init server')
7+
SentryServer.init({
8+
dsn: import.meta.env.VITE_SENTRY_DSN,
9+
tracesSampleRate: 1.0,
10+
profilesSampleRate: 1.0,
11+
})
12+
}).client(() => {
13+
console.log('Sentry init client')
14+
Sentry.init({
15+
dsn: import.meta.env.VITE_SENTRY_DSN,
16+
tracesSampleRate: 1.0,
17+
profilesSampleRate: 1.0,
18+
integrations: [
19+
Sentry.replayIntegration({
20+
maskAllText: false,
21+
blockAllMedia: false,
22+
})
23+
]
24+
})
25+
})()

templates/react/add-on/sentry/assets/src/routes/demo.sentry.bad-server-func.tsx

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)