diff --git a/internal/metrics/metrics.go b/internal/metrics/metrics.go index d3599d700c..e7d6cc800f 100644 --- a/internal/metrics/metrics.go +++ b/internal/metrics/metrics.go @@ -65,7 +65,7 @@ const ( collectionName = "collection_name" segmentStateLabelName = "segment_state" usernameLabelName = "username" - rolenameLabelName = "role_name" + roleNameLabelName = "role_name" cacheNameLabelName = "cache_name" cacheStateLabelName = "cache_state" ) diff --git a/internal/metrics/rootcoord_metrics.go b/internal/metrics/rootcoord_metrics.go index c8e6554068..aeae154329 100644 --- a/internal/metrics/rootcoord_metrics.go +++ b/internal/metrics/rootcoord_metrics.go @@ -142,6 +142,7 @@ var ( Name: "time_tick_delay", Help: "The max time tick delay of flow graphs", }, []string{ + roleNameLabelName, nodeIDLabelName, }) ) diff --git a/internal/rootcoord/quota_center.go b/internal/rootcoord/quota_center.go index a4ea80f1a5..eb00ecec0e 100644 --- a/internal/rootcoord/quota_center.go +++ b/internal/rootcoord/quota_center.go @@ -428,7 +428,7 @@ func (q *QuotaCenter) getTimeTickDelayFactor(ts Timestamp) float64 { vchannel = metric.Fgm.MinFlowGraphChannel minTt = t2 } - metrics.RootCoordTtDelay.WithLabelValues(strconv.FormatInt(nodeID, 10)).Set(float64(curMaxDelay.Milliseconds())) + metrics.RootCoordTtDelay.WithLabelValues(typeutil.QueryNodeRole, strconv.FormatInt(nodeID, 10)).Set(float64(curMaxDelay.Milliseconds())) } } for nodeID, metric := range q.dataNodeMetrics { @@ -441,7 +441,7 @@ func (q *QuotaCenter) getTimeTickDelayFactor(ts Timestamp) float64 { vchannel = metric.Fgm.MinFlowGraphChannel minTt = t2 } - metrics.RootCoordTtDelay.WithLabelValues(strconv.FormatInt(nodeID, 10)).Set(float64(curMaxDelay.Milliseconds())) + metrics.RootCoordTtDelay.WithLabelValues(typeutil.DataNodeRole, strconv.FormatInt(nodeID, 10)).Set(float64(curMaxDelay.Milliseconds())) } }