Skip to content

Commit

Permalink
fix: spec_replicas metric add tiproxy (#5280)
Browse files Browse the repository at this point in the history
  • Loading branch information
happy-v587 authored Sep 5, 2023
1 parent ffb6139 commit 6702782
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/tidbcluster/tidb_cluster_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ func (c *defaultTidbClusterControl) recordMetrics(tc *v1alpha1.TidbCluster) {
if tc.Spec.TiDB != nil {
metrics.ClusterSpecReplicas.WithLabelValues(ns, tcName, "tidb").Set(float64(tc.Spec.TiDB.Replicas))
}
if tc.Spec.TiProxy != nil {
metrics.ClusterSpecReplicas.WithLabelValues(ns, tcName, "tiproxy").Set(float64(tc.Spec.TiProxy.Replicas))
}
if tc.Spec.TiFlash != nil {
metrics.ClusterSpecReplicas.WithLabelValues(ns, tcName, "tiflash").Set(float64(tc.Spec.TiFlash.Replicas))
}
Expand Down

0 comments on commit 6702782

Please sign in to comment.