diff --git a/src/commands/Dashboard.ts b/src/commands/Dashboard.ts index 559a3cf8..b41c47b6 100644 --- a/src/commands/Dashboard.ts +++ b/src/commands/Dashboard.ts @@ -622,7 +622,9 @@ export class Dashboard { const nonce = WebviewHelper.getNonce(); - const version = Extension.getInstance().getVersion(); + const ext = Extension.getInstance(); + const version = ext.getVersion(); + const isBeta = ext.isBetaVersion(); return ` @@ -634,7 +636,7 @@ export class Dashboard { Front Matter Dashboard -
+
Daily usage diff --git a/src/dashboardWebView/index.tsx b/src/dashboardWebView/index.tsx index 94144d19..8b23f39f 100644 --- a/src/dashboardWebView/index.tsx +++ b/src/dashboardWebView/index.tsx @@ -7,10 +7,17 @@ import { Integrations } from "@sentry/tracing"; import { SENTRY_LINK } from "../constants"; import './styles.css'; +const elm = document.querySelector("#app"); +const welcome = elm?.getAttribute("data-showWelcome"); +const version = elm?.getAttribute("data-version"); +const environment = elm?.getAttribute("data-environment"); + Sentry.init({ dsn: SENTRY_LINK, integrations: [new Integrations.BrowserTracing()], tracesSampleRate: 0, // No performance tracing required + release: version || "", + environment: environment || "" }); declare const acquireVsCodeApi: () => { @@ -18,7 +25,4 @@ declare const acquireVsCodeApi: () => { setState: (data: T) => void; postMessage: (msg: unknown) => void; }; - -const elm = document.querySelector("#app"); -const welcome = elm?.getAttribute("data-showWelcome"); render(, elm); \ No newline at end of file diff --git a/src/explorerView/ExplorerView.ts b/src/explorerView/ExplorerView.ts index fcd52e51..deb91a98 100644 --- a/src/explorerView/ExplorerView.ts +++ b/src/explorerView/ExplorerView.ts @@ -633,7 +633,9 @@ export class ExplorerView implements WebviewViewProvider, Disposable { const nonce = WebviewHelper.getNonce(); - const version = Extension.getInstance().getVersion(); + const ext = Extension.getInstance(); + const version = ext.getVersion(); + const isBeta = ext.isBetaVersion(); return ` @@ -648,7 +650,7 @@ export class ExplorerView implements WebviewViewProvider, Disposable { Front Matter -
+
Daily usage diff --git a/src/panelWebView/index.tsx b/src/panelWebView/index.tsx index 94741918..eb3242d5 100644 --- a/src/panelWebView/index.tsx +++ b/src/panelWebView/index.tsx @@ -17,10 +17,16 @@ import '@bendera/vscode-webview-elements/dist/vscode-label'; import '@vscode/webview-ui-toolkit/dist/esm/checkbox'; +const elm = document.querySelector("#app"); +const version = elm?.getAttribute("data-version"); +const environment = elm?.getAttribute("data-environment"); + Sentry.init({ dsn: SENTRY_LINK, integrations: [new Integrations.BrowserTracing()], tracesSampleRate: 0, // No performance tracing required + release: version || "", + environment: environment || "" }); declare const acquireVsCodeApi: () => { @@ -29,5 +35,4 @@ declare const acquireVsCodeApi: () => { postMessage: (msg: unknown) => void; }; -const elm = document.querySelector("#app"); render(, elm);