diff --git a/pkg/controller/tidbcluster/tidb_cluster_control.go b/pkg/controller/tidbcluster/tidb_cluster_control.go index 8f27788a0c8..3ca6ea7e374 100644 --- a/pkg/controller/tidbcluster/tidb_cluster_control.go +++ b/pkg/controller/tidbcluster/tidb_cluster_control.go @@ -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)) }