Skip to content

Commit

Permalink
Merge pull request #174 from silinternational/feature/silence-sentry-…
Browse files Browse the repository at this point in the history
…locally

ITSE-1396  silence sentry locally and use hostname as environment
  • Loading branch information
hobbitronics committed Aug 14, 2024
2 parents f7e20fe + 4d9c5c6 commit ec13ae5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 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
2 changes: 1 addition & 1 deletion src/password/VerifyReset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default {
}),
async created() {
try {
await this.$API.put(`reset/${this.$route.params.id}/validate`, {
await this.$API.put(`reset/${this.$route.params.id}/validate`, {
code: this.$route.params.code,
})
Expand Down

0 comments on commit ec13ae5

Please sign in to comment.