Skip to content
Merged
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 .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ VITE_DICOM_WEB_NAME=ACME Hospital
# Error reporting URL for sentry.io.
VITE_SENTRY_DSN=

# Sentry environment label, such as production or development. Defaults to production.
VITE_SENTRY_ENVIRONMENT=

# VolView server remote URL
VITE_REMOTE_SERVER_URL=http://localhost:4014

Expand Down
3 changes: 2 additions & 1 deletion src/utils/errorReporting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useLocalStorage } from '@vueuse/core';
import { defineStore } from 'pinia';
import { App, ref, watch } from 'vue';

const { VITE_SENTRY_DSN } = import.meta.env;
const { VITE_SENTRY_DSN, VITE_SENTRY_ENVIRONMENT } = import.meta.env;

export const LOCAL_STORAGE_KEY = 'error-reporting-off';

Expand All @@ -16,6 +16,7 @@ export const init = (app: App<Element>) => {
Sentry.init({
app,
dsn: VITE_SENTRY_DSN,
environment: VITE_SENTRY_ENVIRONMENT || undefined,
});

try {
Expand Down
Loading