Skip to content
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

add sentry ITSE-611 #153

Merged
merged 6 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess this would have to be added to the skinny repos. Doesn't each have there own in Sentry?

# [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://[email protected]/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