Skip to content

Commit

Permalink
[code browser]: Measure all sessions vs errored sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek committed Sep 8, 2022
1 parent 3743c60 commit 5cbe872
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { serverUrl } from '../shared/urls';

export enum MetricsName {
SupervisorFrontendClientTotal = "gitpod_supervisor_frontend_client_total",
SupervisorFrontendErrorTotal = "gitpod_supervisor_frontend_error_total"
SupervisorFrontendErrorTotal = "gitpod_supervisor_frontend_error_total",
SupervisorFrontendLoadTotal = "gitpod_vscode_web_load_total",
}

const MetricsUrl = serverUrl.asIDEMetrics().toString();
Expand Down
1 change: 1 addition & 0 deletions components/supervisor/frontend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ window.addEventListener('error', (event) => {
labels['error'] = 'LoadError';
}
}

IDEMetricsServiceClient.addCounter(MetricsName.SupervisorFrontendErrorTotal, labels).catch(() => {});
});
//#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3165,6 +3165,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7426,7 +7431,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3083,6 +3083,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7260,7 +7265,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3865,6 +3865,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -8653,7 +8658,7 @@ spec:
metadata:
annotations:
gitpod.io: hello
gitpod.io/checksum_config: 7aca852c0c589f808186529f22f534f9db9fa4ae31546cedc307f7e26ec9c4cf
gitpod.io/checksum_config: 9f761f505089327879411de4e788ed30e4d8a4551d7ecbbd32d193cc8fd9af57
hello: world
creationTimestamp: null
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3224,6 +3224,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7701,7 +7706,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3054,6 +3054,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7315,7 +7320,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
7 changes: 6 additions & 1 deletion install/installer/cmd/testdata/render/minimal/output.golden
Original file line number Diff line number Diff line change
Expand Up @@ -3390,6 +3390,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7981,7 +7986,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3402,6 +3402,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7993,7 +7998,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3723,6 +3723,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -8425,7 +8430,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3393,6 +3393,11 @@ data:
}
]
},
{
"name": "gitpod_vscode_web_load_total",
"help": "Total count of supervisor frontend client loading / errored windows",
"labels": null
},
{
"name": "gitpod_supervisor_frontend_client_total",
"help": "Total count of supervisor frontend client",
Expand Down Expand Up @@ -7984,7 +7989,7 @@ spec:
template:
metadata:
annotations:
gitpod.io/checksum_config: eca723709a6407bcb546d40271986d74a615e9d48894864f7e344100a905dbcf
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
creationTimestamp: null
labels:
app: gitpod
Expand Down
10 changes: 10 additions & 0 deletions install/installer/pkg/components/ide-metrics/configmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
},
},
},
{
Name: "gitpod_vscode_web_load_total",
Help: "Total count of supervisor frontend client loading / errored windows",
Labels: []config.LabelAllowList{
{
Name: "status",
AllowValues: []string{"loading", "failed"},
},
},
},
{
Name: "gitpod_supervisor_frontend_client_total",
Help: "Total count of supervisor frontend client",
Expand Down

0 comments on commit 5cbe872

Please sign in to comment.