mirror of https://github.com/milvus-io/milvus.git
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>pull/36612/head
parent
a05a37a583
commit
e4292569c7
|
@ -2507,7 +2507,7 @@ func (node *Proxy) Insert(ctx context.Context, request *milvuspb.InsertRequest)
|
||||||
tr := timerecord.NewTimeRecorder(method)
|
tr := timerecord.NewTimeRecorder(method)
|
||||||
metrics.GetStats(ctx).
|
metrics.GetStats(ctx).
|
||||||
SetNodeID(paramtable.GetNodeID()).
|
SetNodeID(paramtable.GetNodeID()).
|
||||||
SetInboundLabel(method).
|
SetInboundLabel(metrics.InsertLabel).
|
||||||
SetCollectionName(request.GetCollectionName())
|
SetCollectionName(request.GetCollectionName())
|
||||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, request.GetDbName(), request.GetCollectionName()).Inc()
|
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).
|
metrics.GetStats(ctx).
|
||||||
SetNodeID(paramtable.GetNodeID()).
|
SetNodeID(paramtable.GetNodeID()).
|
||||||
SetInboundLabel(method).
|
SetInboundLabel(metrics.DeleteLabel).
|
||||||
SetCollectionName(request.GetCollectionName())
|
SetCollectionName(request.GetCollectionName())
|
||||||
|
|
||||||
if err := merr.CheckHealthy(node.GetStateCode()); err != nil {
|
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).
|
metrics.GetStats(ctx).
|
||||||
SetNodeID(paramtable.GetNodeID()).
|
SetNodeID(paramtable.GetNodeID()).
|
||||||
SetInboundLabel(method).
|
SetInboundLabel(metrics.UpsertLabel).
|
||||||
SetCollectionName(request.GetCollectionName())
|
SetCollectionName(request.GetCollectionName())
|
||||||
|
|
||||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, request.GetDbName(), request.GetCollectionName()).Inc()
|
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, request.GetDbName(), request.GetCollectionName()).Inc()
|
||||||
|
|
Loading…
Reference in New Issue