mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-29 18:38:44 +08:00
enhance: Unify InboundLabel case using metrics.Label (#36613)
Previous label case broken by #36107, this PR make all inbound label using label constants from metrics package. Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
parent
a05a37a583
commit
e4292569c7
@ -2507,7 +2507,7 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
||||
tr := timerecord.NewTimeRecorder(method)
|
||||
metrics.GetStats(ctx).
|
||||
SetNodeID(paramtable.GetNodeID()).
|
||||
SetInboundLabel(method).
|
||||
SetInboundLabel(metrics.InsertLabel).
|
||||
SetCollectionName(request.GetCollectionName())
|
||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, request.GetDbName(), request.GetCollectionName()).Inc()
|
||||
|
||||
@ -2642,7 +2642,7 @@ func (node *Proxy) Delete(ctx context.Context, request *milvuspb.DeleteRequest)
|
||||
|
||||
metrics.GetStats(ctx).
|
||||
SetNodeID(paramtable.GetNodeID()).
|
||||
SetInboundLabel(method).
|
||||
SetInboundLabel(metrics.DeleteLabel).
|
||||
SetCollectionName(request.GetCollectionName())
|
||||
|
||||
if err := merr.CheckHealthy(node.GetStateCode()); err != nil {
|
||||
@ -2751,7 +2751,7 @@ func (node *Proxy) Upsert(ctx context.Context, request *milvuspb.UpsertRequest)
|
||||
|
||||
metrics.GetStats(ctx).
|
||||
SetNodeID(paramtable.GetNodeID()).
|
||||
SetInboundLabel(method).
|
||||
SetInboundLabel(metrics.UpsertLabel).
|
||||
SetCollectionName(request.GetCollectionName())
|
||||
|
||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, request.GetDbName(), request.GetCollectionName()).Inc()
|
||||
|
Loading…
Reference in New Issue
Block a user