Skip to content

Commit

Permalink
silence sentry locally and use hostname as envirnoment
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbitronics committed Aug 13, 2024
1 parent f7e20fe commit 8c61b21
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@ import { configuredRouter as router, configuredVuetify } from './plugins'
import * as Sentry from '@sentry/vue'
import Vue from 'vue'

const environment = process.env.NODE_ENV || 'development'
const dsn = process.env.VUE_APP_SENTRY_DSN
const release = process.env.VUE_APP_VERSION

console.debug('Environment:', environment, 'Release:', release, 'DSN:', dsn)
Sentry.init({
Vue,
dsn,
integrations: [Sentry.browserTracingIntegration({ router }), Sentry.replayIntegration()],
environment,
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,
if (location.hostname !== 'profile.gtis.guru') {
console.debug('Environment:', location.hostname, 'Release:', release, 'DSN:', dsn)
Sentry.init({
Vue,
dsn,
integrations: [Sentry.browserTracingIntegration({ router }), Sentry.replayIntegration()],
environment: location.hostname,
// Set tracesSampleRate to 1.0 to capture 100%
// of transactions for performance monitoring.
// We recommend adjusting this value in production
tracesSampleRate: 1.0,

// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
// tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
// tracePropagationTargets: ['localhost', /^https:\/\/yourserver\.io\/api/],

// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
})
// Capture Replay for 10% of all sessions,
// plus for 100% of sessions with an error
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,
})
}

new Vue({
data: {
Expand Down

0 comments on commit 8c61b21

Please sign in to comment.