@@ -48,7 +48,6 @@ type metrics struct {
48
48
totalStartsCounterVec * prometheus.CounterVec
49
49
totalStartsFailureCounterVec * prometheus.CounterVec
50
50
totalStopsCounterVec * prometheus.CounterVec
51
- totalStopsFailureCounterVec * prometheus.CounterVec
52
51
totalBackupCounterVec * prometheus.CounterVec
53
52
totalBackupFailureCounterVec * prometheus.CounterVec
54
53
totalRestoreCounterVec * prometheus.CounterVec
@@ -122,12 +121,6 @@ func newMetrics(m *Manager) *metrics {
122
121
Name : "workspace_stops_total" ,
123
122
Help : "total number of workspaces stopped" ,
124
123
}, []string {"reason" , "type" , "class" }),
125
- totalStopsFailureCounterVec : prometheus .NewCounterVec (prometheus.CounterOpts {
126
- Namespace : metricsNamespace ,
127
- Subsystem : metricsWorkspaceSubsystem ,
128
- Name : "workspace_stops_failure_total" ,
129
- Help : "total number of workspaces failed to stop" ,
130
- }, []string {"type" , "class" }),
131
124
totalBackupCounterVec : prometheus .NewCounterVec (prometheus.CounterOpts {
132
125
Namespace : metricsNamespace ,
133
126
Subsystem : metricsWorkspaceSubsystem ,
@@ -229,7 +222,6 @@ func (m *metrics) Register(reg prometheus.Registerer) error {
229
222
m .totalStartsCounterVec ,
230
223
m .totalStartsFailureCounterVec ,
231
224
m .totalStopsCounterVec ,
232
- m .totalStopsFailureCounterVec ,
233
225
m .totalBackupCounterVec ,
234
226
m .totalBackupFailureCounterVec ,
235
227
m .totalRestoreCounterVec ,
@@ -328,14 +320,6 @@ func (m *metrics) OnChange(status *api.WorkspaceStatus) {
328
320
}
329
321
counter .Inc ()
330
322
331
- if reason == "failed" {
332
- counter , err = m .totalStopsFailureCounterVec .GetMetricWithLabelValues (tpe , status .Spec .Class )
333
- if err != nil {
334
- log .WithError (err ).WithField ("type" , tpe ).Warn ("cannot get counter for workspace stop failure metric" )
335
- return
336
- }
337
- counter .Inc ()
338
- }
339
323
removeFromState = true
340
324
}
341
325
}
0 commit comments