@nitra/vite-boot 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/src/sentry.js +22 -0
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@nitra/vite-boot",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Vite boot",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  "./apollo": "./src/apollo.js",
8
8
  "./i18n": "./src/i18n.js",
9
- "./pinia": "./src/pinia.js"
9
+ "./pinia": "./src/pinia.js",
10
+ "./sentry": "./src/sentry.js"
10
11
  },
11
12
  "repository": {
12
13
  "type": "git",
package/src/sentry.js ADDED
@@ -0,0 +1,22 @@
1
+ import * as Sentry from '@sentry/browser'
2
+ import { Integrations } from '@sentry/tracing'
3
+
4
+ /**
5
+ * Ініціалізація Sentry
6
+ */
7
+ export const bootSentry = (app, router) => {
8
+ Sentry.init({
9
+ app,
10
+ dsn: import.meta.env.VITE_HASURA_PROTOCOL,
11
+ release: __GITHUB_SHA__,
12
+ integrations: [
13
+ new Integrations.BrowserTracing({
14
+ routingInstrumentation: Sentry.vueRouterInstrumentation(router)
15
+ })
16
+ ],
17
+ // Set tracesSampleRate to 1.0 to capture 100%
18
+ // of transactions for performance monitoring.
19
+ // We recommend adjusting this value in production
20
+ tracesSampleRate: 0.1
21
+ })
22
+ }