Skip to content

Feature/dops 1683/sentry configuration #14

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

Open
wants to merge 9 commits into
base: adar-dev
Choose a base branch
from
Open
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
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
},
"dependencies": {
"@metamask/detect-provider": "^2.0.0",
"@sentry/tracing": "^7.37.1",
"@sentry/vue": "^7.37.1",
"@soramitsu/soraneo-wallet-web": "1.17.8",

"@walletconnect/web3-provider": "^1.8.0",
"base-64": "^1.0.0",
"core-js": "^3.26.0",
Expand Down
22 changes: 22 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ import { demeterLazyView } from '@/modules/demeterFarming/router';
import store from '@/store';
import { updateDocumentTitle } from '@/utils';

import * as Sentry from '@sentry/vue';
import { BrowserTracing } from '@sentry/tracing';

Vue.use(VueRouter);

Component.registerHooks(['beforeRouteEnter', 'beforeRouteUpdate', 'beforeRouteLeave']);
Expand Down Expand Up @@ -296,5 +299,24 @@ router.beforeEach((to, from, next) => {
setRoute(current, false);
});

Sentry.init({
Vue,
dsn: 'https://9aa0954e211541a5a36eaf27016f3d3e@sentry.soramitsu.co.jp/12',
integrations: [
new BrowserTracing({
routingInstrumentation: Sentry.vueRouterInstrumentation(router),

// As the documentation mention:
// If your frontend is making requests to a different domain, you'll need to add it there to propagate
// the sentry-trace and baggage headers to the backend services, which is required to link transactions
// together as part of a single trace.
tracingOrigins: ['adar.com', 'localhost', /^\//, 'api.subquery.network', 'whitelist.polkaswap2.io'],
}),
],
// tracesSampleRate == 1.0 is to capture 100%
// of transactions for performance monitoring.
tracesSampleRate: 1.0,
});

export { lazyComponent, lazyView, goTo };
export default router;
67 changes: 66 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,7 @@
pirates "^4.0.5"
source-map-support "^0.5.16"


"@babel/runtime@^7.12.13", "@babel/runtime@^7.20.0", "@babel/runtime@^7.20.6", "@babel/runtime@^7.20.7", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4":
version "7.20.7"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.7.tgz#fcb41a5a70550e04a7b708037c7c32f7f356d8fd"
Expand All @@ -1044,6 +1045,7 @@
version "7.21.0"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673"
integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw==

dependencies:
regenerator-runtime "^0.13.11"

Expand Down Expand Up @@ -2618,6 +2620,69 @@
resolved "https://registry.yarnpkg.com/@scure/base/-/base-1.1.1.tgz#ebb651ee52ff84f420097055f4bf46cfba403938"
integrity sha512-ZxOhsSyxYwLJj3pLZCefNitxsj093tb2vq90mp2txoYeBqbcjDjqFhyM8eUjq/uFm6zJ+mUuqxlS2FkuSY1MTA==

"@sentry/browser@7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.37.1.tgz#d452ebed7f974f20872d34744e67d856ab54a41b"
integrity sha512-MfVbKzEVHKVH6ZyMCKLtPXvMtRCvxqQzrnK735sYW6EyMpcMYhukBU0pq7ws1E/KaCZjAJi1wDx2nqf2yPIVdQ==
dependencies:
"@sentry/core" "7.37.1"
"@sentry/replay" "7.37.1"
"@sentry/types" "7.37.1"
"@sentry/utils" "7.37.1"
tslib "^1.9.3"

"@sentry/core@7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.37.1.tgz#6d8d151b3d6ae0d6f81c7f4da92cd2e7cb5bf1fa"
integrity sha512-eS5hoFDjAOl7POZg6K77J0oiypiqR1782oVSB49UkjK+D8tCZzZ5PxPMv0b/O0310p7x4oZ3WGRJaWEN3vY4KQ==
dependencies:
"@sentry/types" "7.37.1"
"@sentry/utils" "7.37.1"
tslib "^1.9.3"

"@sentry/replay@7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.37.1.tgz#8ab4588b28baa07e35c417d3ffc6aaf934c58c45"
integrity sha512-3sHOE/oPirdvJbOn0IA/wpds12Sm2WaEtiAeC0+5Gg5mxQzFBLRrsA1Mz/ifzPGwr+ETn3sCyPCnd9b3PWaWMQ==
dependencies:
"@sentry/core" "7.37.1"
"@sentry/types" "7.37.1"
"@sentry/utils" "7.37.1"

"@sentry/tracing@^7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.37.1.tgz#f5db7990f09be8d3c6b621b3718c268fff163ba0"
integrity sha512-3mQG2XtMCGqDkgfzhKpRJAIfRaokNAOF8WafgAmFmZQwEDsRAFjZ3pLoO+KiBUeQE5E5et7HyWBOl9rqHCkWnQ==
dependencies:
"@sentry/core" "7.37.1"
"@sentry/types" "7.37.1"
"@sentry/utils" "7.37.1"
tslib "^1.9.3"

"@sentry/types@7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.37.1.tgz#269da7da39c1a5243bf5f9a35370291b5cc205bb"
integrity sha512-c2HWyWSgVA0V4+DSW2qVb0yjftrb1X/q2CzCom+ayjGHO72qyWC+9Tc+7ZfotU1mapRjqUWBgkXkbGmao8N8Ug==

"@sentry/utils@7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.37.1.tgz#7695d6e30d6178723f3fa446a9553893bca85e96"
integrity sha512-/4mJOyDsfysx+5TXyJgSI+Ihw2/0EVJbrHjCyXPDXW5ADwbtU8VdBZ0unOmF0hk4QfftqwM9cyEu3BN4iBJsEA==
dependencies:
"@sentry/types" "7.37.1"
tslib "^1.9.3"

"@sentry/vue@^7.37.1":
version "7.37.1"
resolved "https://registry.yarnpkg.com/@sentry/vue/-/vue-7.37.1.tgz#84874ed174a4c33e20ee782de154eab504fbce31"
integrity sha512-OT/hjXCNHgJkhKT48qJhj3XvCqYSwuk4fa/CIBI0oYfDIE3KolIBpdp5Iu27Qmx7lCgF9w0yFxdWA2sOnMA0ow==
dependencies:
"@sentry/browser" "7.37.1"
"@sentry/core" "7.37.1"
"@sentry/types" "7.37.1"
"@sentry/utils" "7.37.1"
tslib "^1.9.3"

"@sideway/address@^4.1.0":
version "4.1.2"
resolved "https://registry.yarnpkg.com/@sideway/address/-/address-4.1.2.tgz#811b84333a335739d3969cfc434736268170cad1"
Expand Down Expand Up @@ -14751,7 +14816,7 @@ tslib@2.3.0, tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e"
integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==

tslib@^1.8.1, tslib@^1.9.0:
tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
Expand Down