chore: expose release info to sentry
This commit is contained in:
parent
fb65e0e23d
commit
fd11ea8143
5 changed files with 5 additions and 0 deletions
1
.github/workflows/deploy-netlify.yml
vendored
1
.github/workflows/deploy-netlify.yml
vendored
|
|
@ -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-cli
|
||||
|
|
|
|||
1
.github/workflows/deploy-staging-netlify.yml
vendored
1
.github/workflows/deploy-staging-netlify.yml
vendored
|
|
@ -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: staging
|
||||
run: pnpm run generate
|
||||
|
||||
|
|
|
|||
|
|
@ -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)>
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
1
packages/hoppscotch-app/src/vite-envs.d.ts
vendored
1
packages/hoppscotch-app/src/vite-envs.d.ts
vendored
|
|
@ -22,6 +22,7 @@ interface ImportMetaEnv {
|
|||
|
||||
readonly VITE_SENTRY_DSN?: string
|
||||
readonly VITE_SENTRY_ENVIRONMENT?: string
|
||||
readonly VITE_SENTRY_RELEASE_TAG?: string
|
||||
}
|
||||
|
||||
interface ImportMeta {
|
||||
|
|
|
|||
Loading…
Reference in a new issue