Skip to content

Commit f806270

Browse files
[code browser]: Measure all sessions vs errored sessions
Co-authored-by: Anton Kosyakov <[email protected]>
1 parent 4b4e1d5 commit f806270

File tree

12 files changed

+76
-64
lines changed

12 files changed

+76
-64
lines changed

components/supervisor/frontend/src/ide/ide-metrics-service-client.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import { serverUrl } from '../shared/urls';
88

99
export enum MetricsName {
1010
SupervisorFrontendClientTotal = "gitpod_supervisor_frontend_client_total",
11-
SupervisorFrontendErrorTotal = "gitpod_supervisor_frontend_error_total"
11+
SupervisorFrontendErrorTotal = "gitpod_supervisor_frontend_error_total",
12+
SupervisorFrontendLoadTotal = "gitpod_vscode_web_load_total",
1213
}
1314

1415
const MetricsUrl = serverUrl.asIDEMetrics().toString();

components/supervisor/frontend/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ window.addEventListener('error', (event) => {
3030
labels['error'] = 'LoadError';
3131
}
3232
}
33+
3334
IDEMetricsServiceClient.addCounter(MetricsName.SupervisorFrontendErrorTotal, labels).catch(() => {});
3435
});
3536
//#endregion

install/installer/cmd/testdata/render/aws-setup/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3165,6 +3165,11 @@ data:
31653165
}
31663166
]
31673167
},
3168+
{
3169+
"name": "gitpod_vscode_web_load_total",
3170+
"help": "Total count of supervisor frontend client loading / errored windows",
3171+
"labels": null
3172+
},
31683173
{
31693174
"name": "gitpod_supervisor_frontend_client_total",
31703175
"help": "Total count of supervisor frontend client",
@@ -3768,12 +3773,7 @@ data:
37683773
30
37693774
]
37703775
}
3771-
],
3772-
"errorReporting": {
3773-
"allowComponents": [
3774-
"supervisor-frontend"
3775-
]
3776-
}
3776+
]
37773777
},
37783778
"debug": false,
37793779
"pprof": {
@@ -7431,7 +7431,7 @@ spec:
74317431
template:
74327432
metadata:
74337433
annotations:
7434-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7434+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
74357435
creationTimestamp: null
74367436
labels:
74377437
app: gitpod

install/installer/cmd/testdata/render/azure-setup/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3083,6 +3083,11 @@ data:
30833083
}
30843084
]
30853085
},
3086+
{
3087+
"name": "gitpod_vscode_web_load_total",
3088+
"help": "Total count of supervisor frontend client loading / errored windows",
3089+
"labels": null
3090+
},
30863091
{
30873092
"name": "gitpod_supervisor_frontend_client_total",
30883093
"help": "Total count of supervisor frontend client",
@@ -3686,12 +3691,7 @@ data:
36863691
30
36873692
]
36883693
}
3689-
],
3690-
"errorReporting": {
3691-
"allowComponents": [
3692-
"supervisor-frontend"
3693-
]
3694-
}
3694+
]
36953695
},
36963696
"debug": false,
36973697
"pprof": {
@@ -7265,7 +7265,7 @@ spec:
72657265
template:
72667266
metadata:
72677267
annotations:
7268-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7268+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
72697269
creationTimestamp: null
72707270
labels:
72717271
app: gitpod

install/installer/cmd/testdata/render/customization/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3865,6 +3865,11 @@ data:
38653865
}
38663866
]
38673867
},
3868+
{
3869+
"name": "gitpod_vscode_web_load_total",
3870+
"help": "Total count of supervisor frontend client loading / errored windows",
3871+
"labels": null
3872+
},
38683873
{
38693874
"name": "gitpod_supervisor_frontend_client_total",
38703875
"help": "Total count of supervisor frontend client",
@@ -4468,12 +4473,7 @@ data:
44684473
30
44694474
]
44704475
}
4471-
],
4472-
"errorReporting": {
4473-
"allowComponents": [
4474-
"supervisor-frontend"
4475-
]
4476-
}
4476+
]
44774477
},
44784478
"debug": false,
44794479
"pprof": {
@@ -8658,7 +8658,7 @@ spec:
86588658
metadata:
86598659
annotations:
86608660
gitpod.io: hello
8661-
gitpod.io/checksum_config: 8beda82ff6c689641e3e3d74cfa333942daf49ba5617133a5c6ec21a44408f22
8661+
gitpod.io/checksum_config: 9f761f505089327879411de4e788ed30e4d8a4551d7ecbbd32d193cc8fd9af57
86628662
hello: world
86638663
creationTimestamp: null
86648664
labels:

install/installer/cmd/testdata/render/external-registry/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3224,6 +3224,11 @@ data:
32243224
}
32253225
]
32263226
},
3227+
{
3228+
"name": "gitpod_vscode_web_load_total",
3229+
"help": "Total count of supervisor frontend client loading / errored windows",
3230+
"labels": null
3231+
},
32273232
{
32283233
"name": "gitpod_supervisor_frontend_client_total",
32293234
"help": "Total count of supervisor frontend client",
@@ -3827,12 +3832,7 @@ data:
38273832
30
38283833
]
38293834
}
3830-
],
3831-
"errorReporting": {
3832-
"allowComponents": [
3833-
"supervisor-frontend"
3834-
]
3835-
}
3835+
]
38363836
},
38373837
"debug": false,
38383838
"pprof": {
@@ -7706,7 +7706,7 @@ spec:
77067706
template:
77077707
metadata:
77087708
annotations:
7709-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7709+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
77107710
creationTimestamp: null
77117711
labels:
77127712
app: gitpod

install/installer/cmd/testdata/render/gcp-setup/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3054,6 +3054,11 @@ data:
30543054
}
30553055
]
30563056
},
3057+
{
3058+
"name": "gitpod_vscode_web_load_total",
3059+
"help": "Total count of supervisor frontend client loading / errored windows",
3060+
"labels": null
3061+
},
30573062
{
30583063
"name": "gitpod_supervisor_frontend_client_total",
30593064
"help": "Total count of supervisor frontend client",
@@ -3657,12 +3662,7 @@ data:
36573662
30
36583663
]
36593664
}
3660-
],
3661-
"errorReporting": {
3662-
"allowComponents": [
3663-
"supervisor-frontend"
3664-
]
3665-
}
3665+
]
36663666
},
36673667
"debug": false,
36683668
"pprof": {
@@ -7320,7 +7320,7 @@ spec:
73207320
template:
73217321
metadata:
73227322
annotations:
7323-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7323+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
73247324
creationTimestamp: null
73257325
labels:
73267326
app: gitpod

install/installer/cmd/testdata/render/minimal/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3390,6 +3390,11 @@ data:
33903390
}
33913391
]
33923392
},
3393+
{
3394+
"name": "gitpod_vscode_web_load_total",
3395+
"help": "Total count of supervisor frontend client loading / errored windows",
3396+
"labels": null
3397+
},
33933398
{
33943399
"name": "gitpod_supervisor_frontend_client_total",
33953400
"help": "Total count of supervisor frontend client",
@@ -3993,12 +3998,7 @@ data:
39933998
30
39943999
]
39954000
}
3996-
],
3997-
"errorReporting": {
3998-
"allowComponents": [
3999-
"supervisor-frontend"
4000-
]
4001-
}
4001+
]
40024002
},
40034003
"debug": false,
40044004
"pprof": {
@@ -7986,7 +7986,7 @@ spec:
79867986
template:
79877987
metadata:
79887988
annotations:
7989-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7989+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
79907990
creationTimestamp: null
79917991
labels:
79927992
app: gitpod

install/installer/cmd/testdata/render/statefulset-customization/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3402,6 +3402,11 @@ data:
34023402
}
34033403
]
34043404
},
3405+
{
3406+
"name": "gitpod_vscode_web_load_total",
3407+
"help": "Total count of supervisor frontend client loading / errored windows",
3408+
"labels": null
3409+
},
34053410
{
34063411
"name": "gitpod_supervisor_frontend_client_total",
34073412
"help": "Total count of supervisor frontend client",
@@ -4005,12 +4010,7 @@ data:
40054010
30
40064011
]
40074012
}
4008-
],
4009-
"errorReporting": {
4010-
"allowComponents": [
4011-
"supervisor-frontend"
4012-
]
4013-
}
4013+
]
40144014
},
40154015
"debug": false,
40164016
"pprof": {
@@ -7998,7 +7998,7 @@ spec:
79987998
template:
79997999
metadata:
80008000
annotations:
8001-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
8001+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
80028002
creationTimestamp: null
80038003
labels:
80048004
app: gitpod

install/installer/cmd/testdata/render/use-pod-security-policies/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3723,6 +3723,11 @@ data:
37233723
}
37243724
]
37253725
},
3726+
{
3727+
"name": "gitpod_vscode_web_load_total",
3728+
"help": "Total count of supervisor frontend client loading / errored windows",
3729+
"labels": null
3730+
},
37263731
{
37273732
"name": "gitpod_supervisor_frontend_client_total",
37283733
"help": "Total count of supervisor frontend client",
@@ -4326,12 +4331,7 @@ data:
43264331
30
43274332
]
43284333
}
4329-
],
4330-
"errorReporting": {
4331-
"allowComponents": [
4332-
"supervisor-frontend"
4333-
]
4334-
}
4334+
]
43354335
},
43364336
"debug": false,
43374337
"pprof": {
@@ -8430,7 +8430,7 @@ spec:
84308430
template:
84318431
metadata:
84328432
annotations:
8433-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
8433+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
84348434
creationTimestamp: null
84358435
labels:
84368436
app: gitpod

install/installer/cmd/testdata/render/workspace-requests-limits/output.golden

+7-7
Original file line numberDiff line numberDiff line change
@@ -3393,6 +3393,11 @@ data:
33933393
}
33943394
]
33953395
},
3396+
{
3397+
"name": "gitpod_vscode_web_load_total",
3398+
"help": "Total count of supervisor frontend client loading / errored windows",
3399+
"labels": null
3400+
},
33963401
{
33973402
"name": "gitpod_supervisor_frontend_client_total",
33983403
"help": "Total count of supervisor frontend client",
@@ -3996,12 +4001,7 @@ data:
39964001
30
39974002
]
39984003
}
3999-
],
4000-
"errorReporting": {
4001-
"allowComponents": [
4002-
"supervisor-frontend"
4003-
]
4004-
}
4004+
]
40054005
},
40064006
"debug": false,
40074007
"pprof": {
@@ -7989,7 +7989,7 @@ spec:
79897989
template:
79907990
metadata:
79917991
annotations:
7992-
gitpod.io/checksum_config: 5f647d019f026f04a85e04ad8e695083db2a70f97ee7199143859879d5d40ebe
7992+
gitpod.io/checksum_config: b8a57f4a1f69581201c57d3c5c08057de4eb45898a15cb4be5ad41188c70efdb
79937993
creationTimestamp: null
79947994
labels:
79957995
app: gitpod

install/installer/pkg/components/ide-metrics/configmap.go

+10
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,16 @@ func configmap(ctx *common.RenderContext) ([]runtime.Object, error) {
4646
},
4747
},
4848
},
49+
{
50+
Name: "gitpod_vscode_web_load_total",
51+
Help: "Total count of supervisor frontend client loading / errored windows",
52+
Labels: []config.LabelAllowList{
53+
{
54+
Name: "status",
55+
AllowValues: []string{"loading", "failed"},
56+
},
57+
},
58+
},
4959
{
5060
Name: "gitpod_supervisor_frontend_client_total",
5161
Help: "Total count of supervisor frontend client",

0 commit comments

Comments
 (0)