Skip to content

Commit

Permalink
Add vue sentry integration
Browse files Browse the repository at this point in the history
Here's an example issue: https://sentry.galaxyproject.org/share/issue/c26fff31eb424969beabb70892c77eaa/
Note the Vue section which contains propsData, trace, componentName etc.
  • Loading branch information
mvdbeek committed May 23, 2024
1 parent fa0ca17 commit 5fbe24d
Show file tree
Hide file tree
Showing 3 changed files with 119 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@johmun/vue-tags-input": "^2.1.0",
"@popperjs/core": "^2.11.8",
"@sentry/browser": "^7.74.1",
"@sentry/vue": "^7.114.0",
"@types/jest": "^29.5.6",
"@vueuse/core": "^10.5.0",
"assert": "^2.1.0",
Expand Down
8 changes: 7 additions & 1 deletion client/src/onload/globalInits/initSentry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as Sentry from "@sentry/browser";
import * as Sentry from "@sentry/vue";
import Vue from "vue";

/**
* Initializes Sentry, one of the few functions that should actually be
Expand All @@ -9,13 +10,18 @@ import * as Sentry from "@sentry/browser";
export const initSentry = (galaxy, config) => {
console.log("initSentry");
if (config.sentry) {
const router = galaxy.router;
const { sentry_dsn_public, email } = config.sentry;
let release = galaxy.config.version_major;
if (galaxy.config.version_minor) {
release += `.${galaxy.config.version_minor}`;
}
Sentry.init({
Vue,
dsn: sentry_dsn_public,
integrations: [Sentry.browserTracingIntegration({ router }), Sentry.replayIntegration()],
replaysSessionSampleRate: 0,
replaysOnErrorSampleRate: 1.0,
release: release,
beforeSend(event, hint) {
const error = hint.originalException;
Expand Down
111 changes: 111 additions & 0 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1914,6 +1914,34 @@
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==

"@sentry-internal/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/feedback/-/feedback-7.114.0.tgz#8a1c3d8bbd014c1823d30b9b1128eb244d357c3e"
integrity sha512-kUiLRUDZuh10QE9JbSVVLgqxFoD9eDPOzT0MmzlPuas8JlTmJuV4FtSANNcqctd5mBuLt2ebNXH0MhRMwyae4A==
dependencies:
"@sentry/core" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry-internal/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/replay-canvas/-/replay-canvas-7.114.0.tgz#b81e2c2ebec01c436ad6e687e563ba456e33b615"
integrity sha512-6rTiqmKi/FYtesdM2TM2U+rh6BytdPjLP65KTUodtxohJ+r/3m+termj2o4BhIYPE1YYOZNmbZfwebkuQPmWeg==
dependencies:
"@sentry/core" "7.114.0"
"@sentry/replay" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry-internal/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.114.0.tgz#bdcd364f511e2de45db6e3004faf5685ca2e0f86"
integrity sha512-dOuvfJN7G+3YqLlUY4HIjyWHaRP8vbOgF+OsE5w2l7ZEn1rMAaUbPntAR8AF9GBA6j2zWNoSo8e7GjbJxVofSg==
dependencies:
"@sentry/core" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry-internal/[email protected]":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.74.1.tgz#55ff387e61d2c9533a9a0d099d376332426c8e08"
Expand All @@ -1924,6 +1952,20 @@
"@sentry/utils" "7.74.1"
tslib "^2.4.1 || ^1.9.3"

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.114.0.tgz#b0741bff89189d16c8b19f0775fe6e078147ec33"
integrity sha512-ijJ0vOEY6U9JJADVYGkUbLrAbpGSQgA4zV+KW3tcsBLX9M1jaWq4BV1PWHdzDPPDhy4OgfOjIfaMb5BSPn1U+g==
dependencies:
"@sentry-internal/feedback" "7.114.0"
"@sentry-internal/replay-canvas" "7.114.0"
"@sentry-internal/tracing" "7.114.0"
"@sentry/core" "7.114.0"
"@sentry/integrations" "7.114.0"
"@sentry/replay" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry/browser@^7.74.1":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.74.1.tgz#9302d440bbdcb018abd5fee5959dab4b2fe97383"
Expand All @@ -1936,6 +1978,14 @@
"@sentry/utils" "7.74.1"
tslib "^2.4.1 || ^1.9.3"

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.114.0.tgz#3efe86b92a5379c44dfd0fd4685266b1a30fa898"
integrity sha512-YnanVlmulkjgZiVZ9BfY9k6I082n+C+LbZo52MTvx3FY6RE5iyiPMpaOh67oXEZRWcYQEGm+bKruRxLVP6RlbA==
dependencies:
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry/[email protected]":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.74.1.tgz#9e33cf59b754a994e4054c47c74df1d3fbd30d3c"
Expand All @@ -1945,6 +1995,26 @@
"@sentry/utils" "7.74.1"
tslib "^2.4.1 || ^1.9.3"

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/integrations/-/integrations-7.114.0.tgz#baf249cfa9e359510f41e486a75bf184db18927d"
integrity sha512-BJIBWXGKeIH0ifd7goxOS29fBA8BkEgVVCahs6xIOXBjX1IRS6PmX0zYx/GP23nQTfhJiubv2XPzoYOlZZmDxg==
dependencies:
"@sentry/core" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"
localforage "^1.8.1"

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.114.0.tgz#f552e4803cacb233a2f5f2a4afbf5bed9052a744"
integrity sha512-UvEajoLIX9n2poeW3R4Ybz7D0FgCGXoFr/x/33rdUEMIdTypknxjJWxg6fJngIduzwrlrvWpvP8QiZXczYQy2Q==
dependencies:
"@sentry-internal/tracing" "7.114.0"
"@sentry/core" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sentry/[email protected]":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.74.1.tgz#dcb5040a3b0a9bda160b70cde5368ecbb4f0e782"
Expand All @@ -1954,11 +2024,23 @@
"@sentry/types" "7.74.1"
"@sentry/utils" "7.74.1"

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.114.0.tgz#ab8009d5f6df23b7342121083bed34ee2452e856"
integrity sha512-tsqkkyL3eJtptmPtT0m9W/bPLkU7ILY7nvwpi1hahA5jrM7ppoU0IMaQWAgTD+U3rzFH40IdXNBFb8Gnqcva4w==

"@sentry/[email protected]":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.74.1.tgz#b6f9b1bd266254f1f8b55fbcc92fa649ba2100ed"
integrity sha512-2jIuPc+YKvXqZETwr2E8VYnsH1zsSUR/wkIvg1uTVeVNyoowJv+YsOtCdeGyL2AwiotUBSPKu7O1Lz0kq5rMOQ==

"@sentry/[email protected]":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.114.0.tgz#59d30a79f4acff3c9268de0b345f0bcbc6335112"
integrity sha512-319N90McVpupQ6vws4+tfCy/03AdtsU0MurIE4+W5cubHME08HtiEWlfacvAxX+yuKFhvdsO4K4BB/dj54ideg==
dependencies:
"@sentry/types" "7.114.0"

"@sentry/[email protected]":
version "7.74.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.74.1.tgz#e9a8453c954d02ebed2fd3dbe7588483d8f6d3cb"
Expand All @@ -1967,6 +2049,16 @@
"@sentry/types" "7.74.1"
tslib "^2.4.1 || ^1.9.3"

"@sentry/vue@^7.114.0":
version "7.114.0"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.114.0.tgz#b8dabfe1bffa28828c9a478f7254e6b549965ee0"
integrity sha512-tHydxMJFpUcsmNCbXo59SqeNImX+3mMO+j3T0eLsDZy1NY2fSDFP6PFvuc72RsqiwCKeCKQmQDtAVa5Vt5ZlQA==
dependencies:
"@sentry/browser" "7.114.0"
"@sentry/core" "7.114.0"
"@sentry/types" "7.114.0"
"@sentry/utils" "7.114.0"

"@sinclair/typebox@^0.24.1":
version "0.24.27"
resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.27.tgz"
Expand Down Expand Up @@ -6778,6 +6870,11 @@ imask@^7.1.3:
dependencies:
"@babel/runtime-corejs3" "^7.22.6"

immediate@~3.0.5:
version "3.0.6"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b"
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==

immutable@^4.0.0:
version "4.1.0"
resolved "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz"
Expand Down Expand Up @@ -8037,6 +8134,13 @@ levn@~0.3.0:
prelude-ls "~1.1.2"
type-check "~0.3.2"

[email protected]:
version "3.1.1"
resolved "https://registry.yarnpkg.com/lie/-/lie-3.1.1.tgz#9a436b2cc7746ca59de7a41fa469b3efb76bd87e"
integrity sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==
dependencies:
immediate "~3.0.5"

liftoff@^3.1.0:
version "3.1.0"
resolved "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz"
Expand Down Expand Up @@ -8112,6 +8216,13 @@ loader-utils@^2.0.0:
emojis-list "^3.0.0"
json5 "^2.1.2"

localforage@^1.8.1:
version "1.10.0"
resolved "https://registry.yarnpkg.com/localforage/-/localforage-1.10.0.tgz#5c465dc5f62b2807c3a84c0c6a1b1b3212781dd4"
integrity sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==
dependencies:
lie "3.1.1"

locate-path@^5.0.0:
version "5.0.0"
resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz"
Expand Down

0 comments on commit 5fbe24d

Please sign in to comment.