Skip to content

Commit 8c5ba99

Browse files
committed
feat: make sentry work
1 parent cad7f50 commit 8c5ba99

File tree

5 files changed

+217
-31
lines changed

5 files changed

+217
-31
lines changed

apps/client/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,4 +108,6 @@ dist
108108

109109
# Cypress
110110
cypress/videos
111-
cypress/screenshots
111+
cypress/screenshots
112+
# Sentry Config File
113+
.env.sentry-build-plugin

apps/client/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "client",
3-
"version": "1.9.4-beta",
3+
"version": "1.9.5-beta",
44
"scripts": {
55
"dev": "npm-run-all --parallel dev:*",
66
"dev:run": "FORCE_COLOR=1 vite",
@@ -30,6 +30,7 @@
3030
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
3131
"@rollup/plugin-replace": "^4.0.0",
3232
"@sentry/react": "^7.76.0",
33+
"@sentry/vite-plugin": "^2.9.0",
3334
"@tanstack/query-sync-storage-persister": "^4.0.10",
3435
"@tanstack/react-query": "^4.20.4",
3536
"@tanstack/react-query-devtools": "^4.0.10",

apps/client/src/main.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@ if (window.location.host === "timetabl.vercel.app") {
2525
if (localStorage.getItem("consentedToWelcomeMessage")) {
2626
Sentry.init({
2727
dsn: "https://3eaf1d52758e5e86de9d4d6a4958a5e3@o4506133038301184.ingest.sentry.io/4506133044723712",
28-
integrations: [
29-
new Sentry.BrowserTracing({
30-
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
31-
tracePropagationTargets: [
32-
"localhost",
33-
/^https:\/\/yourserver\.io\/api/,
34-
],
35-
}),
36-
new Sentry.Replay(),
37-
],
28+
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
3829
// Performance Monitoring
3930
tracesSampleRate: 1.0, // Capture 100% of the transactions
4031
// Session Replay

apps/client/vite.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import replace from "@rollup/plugin-replace";
2+
import { sentryVitePlugin } from "@sentry/vite-plugin";
23
import react from "@vitejs/plugin-react";
34
import { injectManifest } from "rollup-plugin-workbox";
45
import { defineConfig } from "vitest/config";
@@ -30,6 +31,10 @@ export default defineConfig({
3031
preventAssignment: true,
3132
}),
3233
react(),
34+
sentryVitePlugin({
35+
org: "hamzah-lc",
36+
project: "timetabl",
37+
}),
3338
],
3439
build: { sourcemap: true },
3540
server: {

0 commit comments

Comments
 (0)