Skip to content

Commit 087861c

Browse files
committed
Harmonize metric label names to controllerring
1 parent 9506c28 commit 087861c

File tree

3 files changed

+79
-37
lines changed

3 files changed

+79
-37
lines changed

docs/monitoring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ This doesn't consider the action taken by the shard.
3333
#### `controller_sharding_ring_calculations_total`
3434

3535
Type: counter
36-
Description: Total number of shard ring calculations per `ControllerRing`.
36+
Description: Total number of hash ring calculations per `ControllerRing`.
3737
This counter is incremented every time the sharder calculates a new consistent hash ring based on the shard leases.
3838

3939
## sharding-exporter

pkg/sharding/metrics/metrics.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,36 +24,36 @@ import (
2424

2525
var (
2626
// AssignmentsTotal is a prometheus counter metric which holds the total number of shard assignments by the sharder
27-
// webhook per Ring and GroupResource.
27+
// webhook per ControllerRing and GroupResource.
2828
// It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
2929
AssignmentsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
3030
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"})
31+
Help: "Total number of shard assignments by the sharder webhook per ControllerRing and GroupResource",
32+
}, []string{"controllerring", "group", "resource"})
3333

3434
// MovementsTotal is a prometheus counter metric which holds the total number of shard movements triggered by the
35-
// sharder controller per Ring and GroupResource.
35+
// sharder controller per ControllerRing and GroupResource.
3636
// It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
3737
MovementsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
3838
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"})
39+
Help: "Total number of shard movements triggered by the sharder controller per ControllerRing and GroupResource",
40+
}, []string{"controllerring", "group", "resource"})
4141

4242
// DrainsTotal is a prometheus counter metric which holds the total number of shard drains triggered by the sharder
43-
// controller per Ring and GroupResource.
43+
// controller per ControllerRing and GroupResource.
4444
// It has a label which refers to the ControllerRing and two labels which refer to the object's GroupResource.
4545
DrainsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
4646
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"})
47+
Help: "Total number of shard drains triggered by the sharder controller per ControllerRing and GroupResource",
48+
}, []string{"controllerring", "group", "resource"})
4949

5050
// RingCalculationsTotal is a prometheus counter metric which holds the total
51-
// number of shard ring calculations per ring kind.
51+
// number of hash ring calculations per ControllerRing.
5252
// It has a label which refers to the ControllerRing.
5353
RingCalculationsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
5454
Name: "controller_sharding_ring_calculations_total",
55-
Help: "Total number of shard ring calculations per ring kind",
56-
}, []string{"name"})
55+
Help: "Total number of hash ring calculations per ControllerRing",
56+
}, []string{"controllerring"})
5757
)
5858

5959
func init() {

0 commit comments

Comments
 (0)