-
Notifications
You must be signed in to change notification settings - Fork 26
Add Sentry monitoring with browser tracing and session replay #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |||||||||||||||||||||||||||||||||||||
| // Plugins | ||||||||||||||||||||||||||||||||||||||
| import {registerPlugins} from '@/plugins' | ||||||||||||||||||||||||||||||||||||||
| import {createPinia} from 'pinia' | ||||||||||||||||||||||||||||||||||||||
| import router from './router' | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const pinia = createPinia() | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
|
|
@@ -23,8 +24,31 @@ import {createApp} from 'vue' | |||||||||||||||||||||||||||||||||||||
| import messageService from './utils/message'; | ||||||||||||||||||||||||||||||||||||||
| import { getVisitorId } from './utils/visitorId'; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| import * as Sentry from "@sentry/vue"; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| const app = createApp(App) | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Sentry.init({ | ||||||||||||||||||||||||||||||||||||||
| app, | ||||||||||||||||||||||||||||||||||||||
| dsn: "https://2f8e5e4ec986c6077d3798ba9f683fdd@o4510762489151488.ingest.us.sentry.io/4510762503438336", | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| // Setting this option to true will send default PII data to Sentry. | ||||||||||||||||||||||||||||||||||||||
| // For example, automatic IP address collection on events | ||||||||||||||||||||||||||||||||||||||
| sendDefaultPii: true, | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+31
to
+36
|
||||||||||||||||||||||||||||||||||||||
| Sentry.init({ | |
| app, | |
| dsn: "https://2f8e5e4ec986c6077d3798ba9f683fdd@o4510762489151488.ingest.us.sentry.io/4510762503438336", | |
| // Setting this option to true will send default PII data to Sentry. | |
| // For example, automatic IP address collection on events | |
| sendDefaultPii: true, | |
| const enableDefaultPii = | |
| typeof process !== 'undefined' && | |
| process.env && | |
| process.env.VUE_APP_SENTRY_SEND_DEFAULT_PII === 'true'; | |
| Sentry.init({ | |
| app, | |
| dsn: "https://2f8e5e4ec986c6077d3798ba9f683fdd@o4510762489151488.ingest.us.sentry.io/4510762503438336", | |
| // Setting this option to true will send default PII data to Sentry. | |
| // For example, automatic IP address collection on events | |
| // Controlled via the VUE_APP_SENTRY_SEND_DEFAULT_PII environment variable. | |
| sendDefaultPii: enableDefaultPii, |
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tracesSampleRate: 1.0 captures 100% of transactions and can create significant overhead/cost in production. Consider making this environment-based (or using tracesSampler) so production can sample at a lower rate.
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The replaysSessionSampleRate value (0.01 = 1%) doesn’t match the comment saying 10%. Please either update the value to 0.1 or fix the comment to reflect the intended sampling rate.
| replaysSessionSampleRate: 0.01, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production. | |
| replaysSessionSampleRate: 0.01, // This sets the sample rate at 1%. You may want to change it to 100% while in development and then sample at a lower rate in production. |
Copilot
AI
Jan 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enableLogs: true will increase data volume and may capture sensitive information depending on what gets logged. Please make this configurable per environment (and/or add scrubbing) so production can disable it if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a new dependency but doesn’t update the lockfile (the repo contains
pnpm-lock.yaml). Please regenerate and commit the lockfile so installs/CI are reproducible.