From ffbb3ff1789b5a0cf5ca6ff9eeaf005a4e6d2478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Mon, 24 Jun 2024 16:23:31 +0200 Subject: [PATCH] Sentry, drobnosti --- package.json | 3 + quasar.config.js | 1 + src/boot/.gitkeep | 0 src/boot/sentry.js | 27 +++ src/components/event/package.json | 14 -- .../flightPlanner/FlightPlanEditPage.vue | 1 - .../public/pilotProfile/CopilotDetailPage.vue | 2 +- .../public/pilotProfile/FlightPlanDetail.vue | 8 +- yarn.lock | 201 ++++++++++++++++++ 9 files changed, 240 insertions(+), 17 deletions(-) delete mode 100644 src/boot/.gitkeep create mode 100644 src/boot/sentry.js delete mode 100644 src/components/event/package.json diff --git a/package.json b/package.json index a663175..ca702c2 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,9 @@ "dependencies": { "@apollo/client": "^3.7.14", "@quasar/extras": "^1.15.11", + "@sentry/browser": "^8.9.2", + "@sentry/integrations": "^7.114.0", + "@sentry/vue": "^8.11.0", "@vue/apollo-composable": "4.0.0-beta.2", "@vue/apollo-option": "^4.0.0-beta.5", "apollo-upload-client": "^17.0.0", diff --git a/quasar.config.js b/quasar.config.js index 10a27e8..900e4f7 100644 --- a/quasar.config.js +++ b/quasar.config.js @@ -29,6 +29,7 @@ module.exports = configure(function (ctx) { // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files boot: [ + "sentry", "cookies", "axios", "apollo", diff --git a/src/boot/.gitkeep b/src/boot/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/boot/sentry.js b/src/boot/sentry.js new file mode 100644 index 0000000..50852fc --- /dev/null +++ b/src/boot/sentry.js @@ -0,0 +1,27 @@ +import {boot} from "quasar/wrappers"; +import * as Sentry from "@sentry/browser"; + +export default boot(({app, router}) => { + Sentry.init({ + app, + dsn: "https://b2580fb40f4f0037d24f32e89d3e5df2@o472821.ingest.us.sentry.io/4506051015802880", + integrations: [ + Sentry.browserTracingIntegration({router}), + Sentry.replayIntegration(), + ], + + // Set tracesSampleRate to 1.0 to capture 100% + // of transactions for tracing. + // We recommend adjusting this value in production + tracesSampleRate: 1.0, + + // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled + // tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/], + + // Capture Replay for 10% of all sessions, + // plus for 100% of sessions with an error + replaysSessionSampleRate: 0.1, + replaysOnErrorSampleRate: 1.0, + }); + +}); diff --git a/src/components/event/package.json b/src/components/event/package.json deleted file mode 100644 index e82a947..0000000 --- a/src/components/event/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "event", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git@kvacek.cz:poletani.cz/app.git" - }, - "private": true -} diff --git a/src/pages/profile/flightPlanner/FlightPlanEditPage.vue b/src/pages/profile/flightPlanner/FlightPlanEditPage.vue index 4c9b8bc..babf315 100644 --- a/src/pages/profile/flightPlanner/FlightPlanEditPage.vue +++ b/src/pages/profile/flightPlanner/FlightPlanEditPage.vue @@ -78,7 +78,6 @@ const fullscreen = ref(false);