Skip to content

Commit

Permalink
Merge pull request #153 from silinternational/feature/add-sentry
Browse files Browse the repository at this point in the history
add sentry ITSE-611
  • Loading branch information
hobbitronics committed May 3, 2024
2 parents 550ea09 + fdcf34d commit 3032122
Show file tree
Hide file tree
Showing 6 changed files with 200 additions and 11 deletions.
2 changes: 2 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ VUE_APP_PRIMARY_COLOR=#015d99
VUE_APP_SECONDARY_COLOR=#791f5e
VUE_APP_ANALYTICS_ID='UA-xxxxxxxxx-y'
VUE_APP_RECAPTCHA_ID=''
VUE_APP_SENTRY_DSN=123

# [authenticator | authy] (Google Authenticator, Authy)
VUE_APP_TOTP_APP_RECOMMENDATION=authenticator
VUE_ALLOWED_HOSTS=profile.example.org
Expand Down
12 changes: 6 additions & 6 deletions dynamorestart/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

158 changes: 158 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "idp-profile-ui",
"version": "5.3.5",
"engines": {
"node": ">=18.0.0 <19.0.0"
},
Expand All @@ -15,6 +16,7 @@
},
"dependencies": {
"@babel/polyfill": "^7.12.1",
"@sentry/vue": "^7.113.0",
"@simplewebauthn/browser": "^4.1.0",
"axios": "^1.6.0",
"date-fns": "^2.28.0",
Expand Down
35 changes: 30 additions & 5 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,43 @@
import '@babel/polyfill'
import Vue from 'vue'
import { configuredRouter, configuredVuetify } from './plugins'
import App from './App.vue'
import '@babel/polyfill'
import '@/global/components'
import '@/global/filters'
import { configuredRouter, 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: 'https://examplePublicKey@o0.ingest.sentry.io/0',
integrations: [Sentry.browserTracingIntegration({ configuredVuetify }), 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,

// 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,
})

new Vue({
data: {
idpConfig: {}
idpConfig: {},
},
async created() {
this.idpConfig = await this.$API.get('config')
},
vuetify: configuredVuetify,
router: configuredRouter,
render: h => h(App),
render: (h) => h(App),
}).$mount('#app')
2 changes: 2 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
process.env.VUE_APP_VERSION = process.env.npm_package_version

module.exports = {
devServer: {
client: {
Expand Down

0 comments on commit 3032122

Please sign in to comment.