Add role name to ttDelay metric (#20239)

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
pull/20277/head
bigsheeper 2022-11-02 10:55:34 +08:00 committed by GitHub
parent cd3b3d3da6
commit 51acba7d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -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"
)

View File

@ -142,6 +142,7 @@ var (
Name: "time_tick_delay",
Help: "The max time tick delay of flow graphs",
}, []string{
roleNameLabelName,
nodeIDLabelName,
})
)

View File

@ -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()))
}
}