Skip to content

Commit 36de3f0

Browse files
committed
Fixes #7335
Handle "no data" by adding 'on() vector(0)' to each numerator Relies on new variable $datasource Also fixes legend for workspace startup panel When exporting from Grafana, disable "export for sharing externally"
1 parent d8e1eaa commit 36de3f0

File tree

1 file changed

+46
-10
lines changed

1 file changed

+46
-10
lines changed

operations/observability/mixins/workspace/dashboards/success-criteria.json

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@
2020
},
2121
"editable": true,
2222
"fiscalYearStartMonth": 0,
23-
"gnetId": null,
2423
"graphTooltip": 0,
25-
"id": 56,
24+
"id": 52,
25+
"iteration": 1640278118309,
2626
"links": [],
2727
"liveNow": false,
2828
"panels": [
2929
{
30-
"datasource": "$datasource",
30+
"datasource": {
31+
"type": "prometheus",
32+
"uid": "${datasource}"
33+
},
3134
"fieldConfig": {
3235
"defaults": {
3336
"color": {
@@ -100,8 +103,13 @@
100103
},
101104
"targets": [
102105
{
103-
"exemplar": true,
104-
"expr": "1-((\n (\n sum(rate(gitpod_ws_manager_workspace_stops_total{reason=\"failed\",type!~\"GHOST|PREBUILD\"}[1d]))\n /\n sum(rate(gitpod_ws_manager_workspace_stops_total{type!~\"GHOST|PREBUILD\"}[1d]))\n )\n) + (\n (\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\",grpc_code!~\"OK|ResourceExhausted\"}[1d]))\n /\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\"}[1d]))\n )\n))",
106+
"datasource": {
107+
"type": "prometheus",
108+
"uid": "${datasource}"
109+
},
110+
"exemplar": false,
111+
"expr": "1-((\n (\n sum(rate(gitpod_ws_manager_workspace_stops_total{reason=\"failed\",type!~\"GHOST|PREBUILD\"}[1d])) OR on() vector(0)\n /\n sum(rate(gitpod_ws_manager_workspace_stops_total{type!~\"GHOST|PREBUILD\"}[1d]))\n )\n) + (\n (\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\",grpc_code!~\"OK|ResourceExhausted\"}[1d])) OR on() vector(0)\n /\n sum(rate(grpc_server_handled_total{grpc_method=\"StartWorkspace\"}[1d]))\n )\n))",
112+
"instant": false,
105113
"interval": "",
106114
"legendFormat": "Success Rate",
107115
"refId": "A"
@@ -111,7 +119,10 @@
111119
"type": "timeseries"
112120
},
113121
{
114-
"datasource": "$datasource",
122+
"datasource": {
123+
"type": "prometheus",
124+
"uid": "${datasource}"
125+
},
115126
"fieldConfig": {
116127
"defaults": {
117128
"color": {
@@ -183,8 +194,12 @@
183194
},
184195
"targets": [
185196
{
197+
"datasource": {
198+
"type": "prometheus",
199+
"uid": "${datasource}"
200+
},
186201
"exemplar": true,
187-
"expr": "histogram_quantile(0.95, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{type!=\"GHOST\",type!=\"PREBUILD\"}[1d])\n ) by (le, cluster)\n)",
202+
"expr": "histogram_quantile(\n 0.95, \n sum(\n rate(gitpod_ws_manager_workspace_startup_seconds_bucket{type!=\"GHOST\",type!=\"PREBUILD\"}[1d])\n ) by (le, cluster)\n )",
188203
"interval": "",
189204
"legendFormat": "{{cluster}}",
190205
"refId": "A"
@@ -194,14 +209,34 @@
194209
"type": "timeseries"
195210
}
196211
],
197-
"schemaVersion": 31,
212+
"refresh": "1m",
213+
"schemaVersion": 34,
198214
"style": "dark",
199215
"tags": [
200216
"workspace",
201217
"success criteria"
202218
],
203219
"templating": {
204-
"list": []
220+
"list": [
221+
{
222+
"current": {
223+
"selected": true,
224+
"text": "prometheus",
225+
"value": "prometheus"
226+
},
227+
"hide": 0,
228+
"includeAll": false,
229+
"multi": false,
230+
"name": "datasource",
231+
"options": [],
232+
"query": "prometheus",
233+
"queryValue": "",
234+
"refresh": 1,
235+
"regex": "",
236+
"skipUrlSync": false,
237+
"type": "datasource"
238+
}
239+
]
205240
},
206241
"time": {
207242
"from": "now-7d",
@@ -211,5 +246,6 @@
211246
"timezone": "",
212247
"title": "Success Criteria",
213248
"uid": "jgjwvIc7k",
214-
"version": 2
249+
"version": 3,
250+
"weekStart": ""
215251
}

0 commit comments

Comments
 (0)