Skip to content

Commit d182e03

Browse files
committed
Add Sentry.io monitoring without PII reporting.
1 parent 752090f commit d182e03

File tree

11 files changed

+63
-1
lines changed

11 files changed

+63
-1
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ VUE_APP_SUBTITLE2="Variants from Chr11 Data Vignette"
1313
VUE_APP_LINK_TERMS_IN_ABOUT=false
1414

1515
VUE_APP_GOOGLE_OAUTH_CLIENT_ID="681537921273-i0odfloiqlq0iv5dodckg0pgt643hers.apps.googleusercontent.com"
16+
17+
# Do not define the Sentry DSN for anything but production
18+
# VUE_SENTRY_DSN=""

src/pages/about/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ import 'bootstrap/dist/css/bootstrap.min.css'
55
import '@/assets/bravo.css'
66
import { authAwareMount } from '@/AuthAwareMount'
77
import { api_url } from '@/ApiUrlResolution'
8+
import * as Sentry from '@sentry/vue'
89

910
const app = createApp(App)
11+
if("VUE_SENTRY_DSN" in process.env){
12+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
13+
}else{
14+
console.log("Sentry.io not enabled for non-production build")
15+
}
1016
app.provide('api', api_url())
1117

1218
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/gene/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import '@/assets/snv_tabulator_table.css'
99
import {clickOutside} from '@/CustomDirectives'
1010
import { agreementExpectedMount } from '@/AuthAwareMount'
1111
import { api_url } from '@/ApiUrlResolution'
12+
import * as Sentry from '@sentry/vue'
1213

1314
const app = createApp(App)
15+
if("VUE_SENTRY_DSN" in process.env){
16+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
17+
}else{
18+
console.log("Sentry.io not enabled for non-production build")
19+
}
1420
app.provide('api', api_url())
1521

1622
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/home/main.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ import 'bootstrap/dist/css/bootstrap.min.css'
55
import '@/assets/bravo.css'
66
import { authAwareMount } from '@/AuthAwareMount'
77
import { api_url } from '@/ApiUrlResolution'
8+
import * as Sentry from '@sentry/vue'
89

910
const app = createApp(App)
11+
if("VUE_SENTRY_DSN" in process.env){
12+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
13+
}else{
14+
console.log("Sentry.io not enabled for non-production build")
15+
}
1016
app.provide('api', api_url())
11-
console.log('Debugging:' + api_url())
1217

1318
// Inject gtag header if config includes a non-blank google analyitics id
1419
if(process.env.VUE_APP_GA_ID){

src/pages/login/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import '@/assets/snv_tabulator_table.css'
99
import { clickOutside } from '@/CustomDirectives'
1010
import { authAwareMount } from '@/AuthAwareMount'
1111
import { api_url } from '@/ApiUrlResolution'
12+
import * as Sentry from '@sentry/vue'
1213

1314
const app = createApp(App)
15+
if("VUE_SENTRY_DSN" in process.env){
16+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
17+
}else{
18+
console.log("Sentry.io not enabled for non-production build")
19+
}
1420
app.provide('api', api_url())
1521

1622
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/logout/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import '@/assets/snv_tabulator_table.css'
99
import { clickOutside } from '@/CustomDirectives'
1010
import { authAwareMount } from '@/AuthAwareMount'
1111
import { api_url } from '@/ApiUrlResolution'
12+
import * as Sentry from '@sentry/vue'
1213

1314
const app = createApp(App)
15+
if("VUE_SENTRY_DSN" in process.env){
16+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
17+
}else{
18+
console.log("Sentry.io not enabled for non-production build")
19+
}
1420
app.provide('api', api_url())
1521

1622
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/privacy/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@ import 'bootstrap/dist/css/bootstrap.min.css'
55
import '@/assets/bravo.css'
66
import { authAwareMount } from '@/AuthAwareMount'
77
import { api_url } from '@/ApiUrlResolution'
8+
import * as Sentry from '@sentry/vue'
89

910
const app = createApp(App)
11+
if("VUE_SENTRY_DSN" in process.env){
12+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
13+
}else{
14+
console.log("Sentry.io not enabled for non-production build")
15+
}
1016
app.provide('api', api_url())
1117

1218
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/region/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ import '@/assets/snv_tabulator_table.css'
99
import {clickOutside} from '@/CustomDirectives'
1010
import { agreementExpectedMount } from '@/AuthAwareMount'
1111
import { api_url } from '@/ApiUrlResolution'
12+
import * as Sentry from '@sentry/vue'
1213

1314
const app = createApp(App)
15+
if("VUE_SENTRY_DSN" in process.env){
16+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
17+
}else{
18+
console.log("Sentry.io not enabled for non-production build")
19+
}
1420
app.provide('api', api_url())
1521

1622
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/terms/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,14 @@ import VueGtag from 'vue-gtag'
44
import 'bootstrap/dist/css/bootstrap.min.css'
55
import { authAwareMount } from '@/AuthAwareMount'
66
import { api_url } from '@/ApiUrlResolution'
7+
import * as Sentry from '@sentry/vue'
78

89
const app = createApp(App)
10+
if("VUE_SENTRY_DSN" in process.env){
11+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
12+
}else{
13+
console.log("Sentry.io not enabled for non-production build")
14+
}
915
app.provide('api', api_url())
1016

1117
// Inject gtag header if config includes a non-blank google analyitics id

src/pages/variant/main.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@ import '@/assets/bravo.css'
66
import {clickOutside} from '@/CustomDirectives'
77
import { agreementExpectedMount } from '@/AuthAwareMount'
88
import { api_url } from '@/ApiUrlResolution'
9+
import * as Sentry from '@sentry/vue'
910

1011
const app = createApp(App)
12+
if("VUE_SENTRY_DSN" in process.env){
13+
Sentry.init({ app, dsn: process.env.VUE_SENTRY_DSN, sendDefaultPii: false })
14+
}else{
15+
console.log("Sentry.io not enabled for non-production build")
16+
}
1117
app.provide('api', api_url())
1218

1319
// Inject gtag header if config includes a non-blank google analyitics id

0 commit comments

Comments
 (0)