Skip to content

Commit b309d99

Browse files
committed
[gp-code] measure all sessions vs errored sessions
1 parent b0a9999 commit b309d99

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/vs/gitpod/browser/workbench/workbench.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@
4949
}
5050

5151
const onVsCodeWorkbenchError = (event) => {
52+
try {
53+
if (!sessionStorage.getItem('gitpodSessionReportedError')) {
54+
sessionStorage.setItem('gitpodSessionReportedError', 'true');
55+
gitpodMetricsAddCounter('gitpod_supervisor_frontend_sessions_errored');
56+
}
57+
} catch {}
58+
5259
if (typeof event?.target?.getAttribute !== 'function') {
5360
gitpodMetricsAddCounter('gitpod_supervisor_frontend_error_total');
5461
return;
@@ -68,6 +75,15 @@
6875
gitpodMetricsAddCounter('gitpod_supervisor_frontend_error_total', labels);
6976
};
7077

78+
try {
79+
if (!sessionStorage.getItem('gitpodSessionReportedLoad')) {
80+
sessionStorage.setItem('gitpodSessionReportedLoad', 'true');
81+
gitpodMetricsAddCounter('gitpod_supervisor_frontend_sessions_total');
82+
}
83+
} catch {}
84+
85+
</script>
86+
<script>
7187
performance.mark('code/didStartRenderer');
7288
</script>
7389
<meta charset="utf-8" />

0 commit comments

Comments
 (0)