summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSanto Cariotti <santo@dcariotti.me>2022-09-27 22:36:55 +0200
committerSanto Cariotti <santo@dcariotti.me>2022-09-27 22:36:55 +0200
commit53794f11c7772291d7951a86a9eff686accd2843 (patch)
tree8aff58c5a1f4c5b5648af114f6888bc74a698815
parent8e5210c6f98670171ac64510451acb1dad691336 (diff)
Add Sentry
-rw-r--r--nuxt.config.js12
-rw-r--r--package-lock.json164
-rw-r--r--package.json2
-rw-r--r--plugins/sentry.js13
4 files changed, 190 insertions, 1 deletions
diff --git a/nuxt.config.js b/nuxt.config.js
index 534ad80..4bfde7a 100644
--- a/nuxt.config.js
+++ b/nuxt.config.js
@@ -23,8 +23,18 @@ export default {
// Global CSS: https://go.nuxtjs.dev/config-css
css: [],
+ env: {
+ sentry_dsn: process.env.SENTRY_DSN,
+ sentry_rate: process.env.SENTRY_RATE,
+ sentry_env: process.env.SENTRY_ENV,
+ },
+
// Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
- plugins: ["~plugins/vue-toastification.js", "~plugins/vue-moment.js"],
+ plugins: [
+ "~plugins/vue-toastification.js",
+ "~plugins/vue-moment.js",
+ "~plugins/sentry.js",
+ ],
// Auto import components: https://go.nuxtjs.dev/config-components
components: true,
diff --git a/package-lock.json b/package-lock.json
index 330861d..f66ada7 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -8,6 +8,8 @@
"name": "verden-ui",
"version": "1.0.0",
"dependencies": {
+ "@sentry/tracing": "^7.13.0",
+ "@sentry/vue": "^7.13.0",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"pug": "^3.0.2",
@@ -3282,6 +3284,99 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
},
+ "node_modules/@sentry/browser": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.13.0.tgz",
+ "integrity": "sha512-WbgClHPYe8TKsdVVbuzd6alxwh3maFQNuljMkSTnYvPx2P+NT0wHljTs37D39FGfSmAwaqn7D/1ZHAtC+6mWxA==",
+ "dependencies": {
+ "@sentry/core": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/core": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.13.0.tgz",
+ "integrity": "sha512-hB46fklmKrSDMEvZOF8qBHhys7PONBFyxQtbNDZUlv/kabs4gF3VEg1ftCaXnjx4lLNlsUl/ScFdM6194RvISg==",
+ "dependencies": {
+ "@sentry/hub": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/hub": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-7.13.0.tgz",
+ "integrity": "sha512-88/GsD1BoyrBwRKJCmVHZtSH5rizOsImUHWEXc1AOa1aR8nanfn56JdAbd6tC55pA+nT4R4H4vN/PrUaomTbtg==",
+ "dependencies": {
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/tracing": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.13.0.tgz",
+ "integrity": "sha512-/MKSd25rGv6Pc0FPBLXJifkfvSaYVPA8XUOLzVeDN0gl07h8AXli4qG9amTh/4Wb5h4dFpbcscOvW2VC+pxkIA==",
+ "dependencies": {
+ "@sentry/hub": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/types": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.13.0.tgz",
+ "integrity": "sha512-ttckM1XaeyHRLMdr79wmGA5PFbTGx2jio9DCD/mkEpSfk6OGfqfC7gpwy7BNstDH/VKyQj/lDCJPnwvWqARMoQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/utils": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.13.0.tgz",
+ "integrity": "sha512-jnR85LgRLSk7IQe2OhKOPMY4fasJCNQNW0iCXsH+S2R1qnsF+N4ksNkQ+7JyyM9E7F03YpI2qd76bKY0VIn5iA==",
+ "dependencies": {
+ "@sentry/types": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@sentry/vue": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-7.13.0.tgz",
+ "integrity": "sha512-+OP0h4hE8Gz8xwN3rcHrbQpqhNQGQJoM8f7cOPw7TU7TCXj4apMsR4o5xPVlvSZl3TG0J9SBUPrZdd0Va9gptw==",
+ "dependencies": {
+ "@sentry/browser": "7.13.0",
+ "@sentry/core": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "peerDependencies": {
+ "vue": "2.x || 3.x"
+ }
+ },
"node_modules/@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
@@ -22653,6 +22748,75 @@
"resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz",
"integrity": "sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g=="
},
+ "@sentry/browser": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.13.0.tgz",
+ "integrity": "sha512-WbgClHPYe8TKsdVVbuzd6alxwh3maFQNuljMkSTnYvPx2P+NT0wHljTs37D39FGfSmAwaqn7D/1ZHAtC+6mWxA==",
+ "requires": {
+ "@sentry/core": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
+ "@sentry/core": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.13.0.tgz",
+ "integrity": "sha512-hB46fklmKrSDMEvZOF8qBHhys7PONBFyxQtbNDZUlv/kabs4gF3VEg1ftCaXnjx4lLNlsUl/ScFdM6194RvISg==",
+ "requires": {
+ "@sentry/hub": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
+ "@sentry/hub": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-7.13.0.tgz",
+ "integrity": "sha512-88/GsD1BoyrBwRKJCmVHZtSH5rizOsImUHWEXc1AOa1aR8nanfn56JdAbd6tC55pA+nT4R4H4vN/PrUaomTbtg==",
+ "requires": {
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
+ "@sentry/tracing": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.13.0.tgz",
+ "integrity": "sha512-/MKSd25rGv6Pc0FPBLXJifkfvSaYVPA8XUOLzVeDN0gl07h8AXli4qG9amTh/4Wb5h4dFpbcscOvW2VC+pxkIA==",
+ "requires": {
+ "@sentry/hub": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
+ "@sentry/types": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.13.0.tgz",
+ "integrity": "sha512-ttckM1XaeyHRLMdr79wmGA5PFbTGx2jio9DCD/mkEpSfk6OGfqfC7gpwy7BNstDH/VKyQj/lDCJPnwvWqARMoQ=="
+ },
+ "@sentry/utils": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.13.0.tgz",
+ "integrity": "sha512-jnR85LgRLSk7IQe2OhKOPMY4fasJCNQNW0iCXsH+S2R1qnsF+N4ksNkQ+7JyyM9E7F03YpI2qd76bKY0VIn5iA==",
+ "requires": {
+ "@sentry/types": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
+ "@sentry/vue": {
+ "version": "7.13.0",
+ "resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-7.13.0.tgz",
+ "integrity": "sha512-+OP0h4hE8Gz8xwN3rcHrbQpqhNQGQJoM8f7cOPw7TU7TCXj4apMsR4o5xPVlvSZl3TG0J9SBUPrZdd0Va9gptw==",
+ "requires": {
+ "@sentry/browser": "7.13.0",
+ "@sentry/core": "7.13.0",
+ "@sentry/types": "7.13.0",
+ "@sentry/utils": "7.13.0",
+ "tslib": "^1.9.3"
+ }
+ },
"@tootallnate/once": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz",
diff --git a/package.json b/package.json
index b230078..2d01801 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,8 @@
"lintfix": "npm run lint:js -- --fix"
},
"dependencies": {
+ "@sentry/tracing": "^7.13.0",
+ "@sentry/vue": "^7.13.0",
"core-js": "^3.19.3",
"nuxt": "^2.15.8",
"pug": "^3.0.2",
diff --git a/plugins/sentry.js b/plugins/sentry.js
new file mode 100644
index 0000000..2bd0443
--- /dev/null
+++ b/plugins/sentry.js
@@ -0,0 +1,13 @@
+import Vue from "vue";
+import * as Sentry from "@sentry/vue";
+import { BrowserTracing } from "@sentry/tracing";
+
+export default ({ app, _, env }) => {
+ app.sentry = Sentry.init({
+ Vue,
+ dsn: env.sentry_dsn,
+ integrations: [new BrowserTracing()],
+ tracesSampleRate: env.sentry_rate,
+ environment: env.sentry_env,
+ });
+};