Minimal setup for sentry error tracing.
This commit is contained in:
		| @@ -13,6 +13,9 @@ | |||||||
|   "license": "ISC", |   "license": "ISC", | ||||||
|   "dependencies": { |   "dependencies": { | ||||||
|     "@babel/polyfill": "~7.2", |     "@babel/polyfill": "~7.2", | ||||||
|  |     "@sentry/browser": "^5.27.4", | ||||||
|  |     "@sentry/integrations": "^5.27.4", | ||||||
|  |     "@sentry/tracing": "^5.27.4", | ||||||
|     "@zxing/library": "^0.15.2", |     "@zxing/library": "^0.15.2", | ||||||
|     "body-parser": "^1.19.0", |     "body-parser": "^1.19.0", | ||||||
|     "canvas-confetti": "^1.2.0", |     "canvas-confetti": "^1.2.0", | ||||||
|   | |||||||
| @@ -4,11 +4,26 @@ import { routes } from "@/router.js"; | |||||||
| import Vinlottis from "@/Vinlottis"; | import Vinlottis from "@/Vinlottis"; | ||||||
| import VueAnalytics from "vue-analytics"; | import VueAnalytics from "vue-analytics"; | ||||||
|  |  | ||||||
|  | import * as Sentry from "@sentry/browser"; | ||||||
|  | import { Vue as VueIntegration } from "@sentry/integrations"; | ||||||
|  | import { Integrations } from "@sentry/tracing"; | ||||||
|  |  | ||||||
| Vue.use(VueRouter); | Vue.use(VueRouter); | ||||||
| Vue.use(VueAnalytics, { | Vue.use(VueAnalytics, { | ||||||
|   id: "UA-156846886-1" |   id: "UA-156846886-1" | ||||||
| }); | }); | ||||||
|  |  | ||||||
|  | Sentry.init({ | ||||||
|  |   dsn: "https://7debc951f0074fb68d7a76a1e3ace6fa@o364834.ingest.sentry.io/4905091", | ||||||
|  |   integrations: [ | ||||||
|  |     new VueIntegration({ | ||||||
|  |       Vue, | ||||||
|  |       tracing: true | ||||||
|  |     }), | ||||||
|  |     new Integrations.BrowserTracing(), | ||||||
|  |   ] | ||||||
|  | }) | ||||||
|  |  | ||||||
| const router = new VueRouter({ | const router = new VueRouter({ | ||||||
|   routes: routes |   routes: routes | ||||||
| }); | }); | ||||||
| @@ -20,3 +35,4 @@ new Vue({ | |||||||
|   template: "<Vinlottis/>", |   template: "<Vinlottis/>", | ||||||
|   render: h => h(Vinlottis) |   render: h => h(Vinlottis) | ||||||
| }); | }); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user