@@ -22,38 +22,44 @@ import (
2222 "sigs.k8s.io/controller-runtime/pkg/metrics"
2323)
2424
25+ const Namespace = "controller_sharding"
26+
2527var (
2628 // AssignmentsTotal is a prometheus counter metric which holds the total number of shard assignments by the sharder
27- // webhook per Ring and GroupResource.
29+ // webhook per ControllerRing and GroupResource.
2830 // It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
2931 AssignmentsTotal = prometheus .NewCounterVec (prometheus.CounterOpts {
30- Name : "controller_sharding_assignments_total" ,
31- Help : "Total number of shard assignments by the sharder webhook per Ring and GroupResource" ,
32- }, []string {"ringName" , "group" , "resource" })
32+ Namespace : Namespace ,
33+ Name : "assignments_total" ,
34+ Help : "Total number of shard assignments by the sharder webhook per ControllerRing and GroupResource" ,
35+ }, []string {"controllerring" , "group" , "resource" })
3336
3437 // MovementsTotal is a prometheus counter metric which holds the total number of shard movements triggered by the
35- // sharder controller per Ring and GroupResource.
38+ // sharder controller per ControllerRing and GroupResource.
3639 // It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
3740 MovementsTotal = prometheus .NewCounterVec (prometheus.CounterOpts {
38- Name : "controller_sharding_movements_total" ,
39- Help : "Total number of shard movements triggered by the sharder controller per Ring and GroupResource" ,
40- }, []string {"ringName" , "group" , "resource" })
41+ Namespace : Namespace ,
42+ Name : "movements_total" ,
43+ Help : "Total number of shard movements triggered by the sharder controller per ControllerRing and GroupResource" ,
44+ }, []string {"controllerring" , "group" , "resource" })
4145
4246 // DrainsTotal is a prometheus counter metric which holds the total number of shard drains triggered by the sharder
43- // controller per Ring and GroupResource.
47+ // controller per ControllerRing and GroupResource.
4448 // It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
4549 DrainsTotal = prometheus .NewCounterVec (prometheus.CounterOpts {
46- Name : "controller_sharding_drains_total" ,
47- Help : "Total number of shard drains triggered by the sharder controller per Ring and GroupResource" ,
48- }, []string {"ringName" , "group" , "resource" })
50+ Namespace : Namespace ,
51+ Name : "drains_total" ,
52+ Help : "Total number of shard drains triggered by the sharder controller per ControllerRing and GroupResource" ,
53+ }, []string {"controllerring" , "group" , "resource" })
4954
5055 // RingCalculationsTotal is a prometheus counter metric which holds the total
51- // number of shard ring calculations per ring kind .
56+ // number of hash ring calculations per ControllerRing .
5257 // It has a label which refers to the ControllerRing.
5358 RingCalculationsTotal = prometheus .NewCounterVec (prometheus.CounterOpts {
54- Name : "controller_sharding_ring_calculations_total" ,
55- Help : "Total number of shard ring calculations per ring kind" ,
56- }, []string {"name" })
59+ Namespace : Namespace ,
60+ Name : "ring_calculations_total" ,
61+ Help : "Total number of hash ring calculations per ControllerRing" ,
62+ }, []string {"controllerring" })
5763)
5864
5965func init () {
0 commit comments