Skip to content

Commit

Permalink
feat: make sentry work
Browse files Browse the repository at this point in the history
  • Loading branch information
debater-coder committed Oct 29, 2023
1 parent cad7f50 commit 8c5ba99
Show file tree
Hide file tree
Showing 5 changed files with 217 additions and 31 deletions.
4 changes: 3 additions & 1 deletion apps/client/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,6 @@ dist

# Cypress
cypress/videos
cypress/screenshots
cypress/screenshots
# Sentry Config File
.env.sentry-build-plugin
3 changes: 2 additions & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client",
"version": "1.9.4-beta",
"version": "1.9.5-beta",
"scripts": {
"dev": "npm-run-all --parallel dev:*",
"dev:run": "FORCE_COLOR=1 vite",
Expand Down Expand Up @@ -30,6 +30,7 @@
"@nikolovlazar/chakra-ui-prose": "^1.2.1",
"@rollup/plugin-replace": "^4.0.0",
"@sentry/react": "^7.76.0",
"@sentry/vite-plugin": "^2.9.0",
"@tanstack/query-sync-storage-persister": "^4.0.10",
"@tanstack/react-query": "^4.20.4",
"@tanstack/react-query-devtools": "^4.0.10",
Expand Down
11 changes: 1 addition & 10 deletions apps/client/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,7 @@ if (window.location.host === "timetabl.vercel.app") {
if (localStorage.getItem("consentedToWelcomeMessage")) {
Sentry.init({
dsn: "https://3eaf1d52758e5e86de9d4d6a4958a5e3@o4506133038301184.ingest.sentry.io/4506133044723712",
integrations: [
new Sentry.BrowserTracing({
// Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
tracePropagationTargets: [
"localhost",
/^https:\/\/yourserver\.io\/api/,
],
}),
new Sentry.Replay(),
],
integrations: [new Sentry.BrowserTracing(), new Sentry.Replay()],
// Performance Monitoring
tracesSampleRate: 1.0, // Capture 100% of the transactions
// Session Replay
Expand Down
5 changes: 5 additions & 0 deletions apps/client/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import replace from "@rollup/plugin-replace";
import { sentryVitePlugin } from "@sentry/vite-plugin";
import react from "@vitejs/plugin-react";
import { injectManifest } from "rollup-plugin-workbox";
import { defineConfig } from "vitest/config";
Expand Down Expand Up @@ -30,6 +31,10 @@ export default defineConfig({
preventAssignment: true,
}),
react(),
sentryVitePlugin({
org: "hamzah-lc",
project: "timetabl",
}),
],
build: { sourcemap: true },
server: {
Expand Down
Loading

1 comment on commit 8c5ba99

@vercel
Copy link

@vercel vercel bot commented on 8c5ba99 Oct 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.