enhance: Remove duplicated collectionID label for task latency (#32308)

`CollectionID` already exists in channel name, so remove it to save
metrics traffic.

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2024-04-16 18:55:19 +08:00 committed by GitHub
parent 84f05ba66e
commit 72c172a7d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -798,7 +798,7 @@ func (scheduler *taskScheduler) remove(task Task) {
scheduler.updateTaskMetrics()
log.Info("task removed")
metrics.QueryCoordTaskLatency.WithLabelValues(scheduler.getTaskMetricsLabel(task), fmt.Sprint(task.CollectionID()), task.Shard()).Observe(float64(task.GetTaskLatency()))
metrics.QueryCoordTaskLatency.WithLabelValues(scheduler.getTaskMetricsLabel(task), task.Shard()).Observe(float64(task.GetTaskLatency()))
}
func (scheduler *taskScheduler) getTaskMetricsLabel(task Task) string {

View File

@ -129,7 +129,7 @@ var (
Name: "task_latency",
Help: "latency of all kind of task in query coord scheduler scheduler",
Buckets: longTaskBuckets,
}, []string{taskTypeLabel, collectionIDLabelName, channelNameLabelName})
}, []string{taskTypeLabel, channelNameLabelName})
)
// RegisterQueryCoord registers QueryCoord metrics