Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: expose release info to sentry
Andrew Bastinfd11ea81432c
diff --git a/.github/workflows/deploy-netlify.yml b/.github/workflows/deploy-netlify.ymlindex dbcbc051f..53a0c705b 100644--- a/.github/workflows/deploy-netlify.yml+++ b/.github/workflows/deploy-netlify.yml@@ -25,6 +25,7 @@ jobs:env:VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}VITE_SENTRY_ENVIRONMENT: production+ VITE_SENTRY_RELEASE_TAG: ${{ github.sha }}run: pnpm run generate# Deploy the production site with netlify-clidiff --git a/.github/workflows/deploy-staging-netlify.yml b/.github/workflows/deploy-staging-netlify.ymlindex cef1dc4f0..fc9e455f0 100644--- a/.github/workflows/deploy-staging-netlify.yml+++ b/.github/workflows/deploy-staging-netlify.yml@@ -34,6 +34,7 @@ jobs:VITE_BACKEND_GQL_URL: ${{ secrets.STAGING_BACKEND_GQL_URL }}VITE_BACKEND_WS_URL: ${{ secrets.STAGING_BACKEND_WS_URL }}VITE_SENTRY_DSN: ${{ secrets.SENTRY_DSN }}+ VITE_SENTRY_RELEASE_TAG: ${{ github.sha }}VITE_SENTRY_ENVIRONMENT: stagingrun: pnpm run generatediff --git a/packages/hoppscotch-app/.env.example b/packages/hoppscotch-app/.env.exampleindex b11e641a1..c5bd6cbba 100644--- a/packages/hoppscotch-app/.env.example+++ b/packages/hoppscotch-app/.env.example@@ -24,3 +24,4 @@ VITE_BACKEND_WS_URL=wss://api.hoppscotch.io/graphql# Sentry (Optional)# VITE_SENTRY_DSN: <Sentry DSN here># VITE_SENTRY_ENVIRONMENT: <Sentry environment value here>+# VITE_SENTRY_RELEASE_TAG: <Sentry release tag here (for release monitoring)>diff --git a/packages/hoppscotch-app/src/modules/sentry.ts b/packages/hoppscotch-app/src/modules/sentry.tsindex 02ef6f044..4fb4f5b98 100644--- a/packages/hoppscotch-app/src/modules/sentry.ts+++ b/packages/hoppscotch-app/src/modules/sentry.ts@@ -51,6 +51,7 @@ function initSentry(dsn: string, router: Router, app: App) {Sentry.init({app,dsn,+ release: import.meta.env.VITE_SENTRY_RELEASE_TAG ?? undefined,environment: APP_IS_IN_DEV_MODE? "dev": import.meta.env.VITE_SENTRY_ENVIRONMENT,diff --git a/packages/hoppscotch-app/src/vite-envs.d.ts b/packages/hoppscotch-app/src/vite-envs.d.tsindex 1c9656f2f..aa2de729e 100644--- a/packages/hoppscotch-app/src/vite-envs.d.ts+++ b/packages/hoppscotch-app/src/vite-envs.d.ts@@ -22,6 +22,7 @@ interface ImportMetaEnv {readonly VITE_SENTRY_DSN?: stringreadonly VITE_SENTRY_ENVIRONMENT?: string+ readonly VITE_SENTRY_RELEASE_TAG?: string}interface ImportMeta {