File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed
internal/controller/metrics Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -22,16 +22,22 @@ import (
22
22
)
23
23
24
24
var (
25
+ // QueueLength is a prometheus metric which counts the current reconcile
26
+ // queue length per controller
25
27
QueueLength = prometheus .NewGaugeVec (prometheus.GaugeOpts {
26
28
Name : "controller_runtime_reconcile_queue_length" ,
27
29
Help : "Length of reconcile queue per controller" ,
28
30
}, []string {"controller" })
29
31
32
+ // ReconcileErrors is a prometheus counter metrics which holds the total
33
+ // number of errors from the Reconciler
30
34
ReconcileErrors = prometheus .NewCounterVec (prometheus.CounterOpts {
31
35
Name : "controller_runtime_reconcile_errors_total" ,
32
36
Help : "Total number of reconcile errors per controller" ,
33
37
}, []string {"controller" })
34
38
39
+ // ReconcileTime is a prometheus metric which keeps track of the duration
40
+ // of reconciles
35
41
ReconcileTime = prometheus .NewHistogramVec (prometheus.HistogramOpts {
36
42
Name : "controller_runtime_reconcile_time_second" ,
37
43
Help : "Length of time per reconcile per controller" ,
Original file line number Diff line number Diff line change @@ -185,7 +185,9 @@ func (cm *controllerManager) serveMetrics(stop <-chan struct{}) {
185
185
// Shutdown the server when stop is closed
186
186
select {
187
187
case <- stop :
188
- server .Shutdown (context .Background ())
188
+ if err := server .Shutdown (context .Background ()); err != nil {
189
+ cm .errChan <- err
190
+ }
189
191
}
190
192
}
191
193
Original file line number Diff line number Diff line change @@ -17,5 +17,4 @@ limitations under the License.
17
17
/*
18
18
Package metrics contains controller related metrics utilities
19
19
*/
20
-
21
20
package metrics
You can’t perform that action at this time.
0 commit comments