mirror of https://github.com/milvus-io/milvus.git
enhance: remove the invalid log (#35465)
/kind improvement Signed-off-by: SimFG <bang.fu@zilliz.com>pull/35433/head
parent
0868a978d1
commit
0400eb91c1
|
@ -16,7 +16,7 @@ import (
|
|||
|
||||
func UnaryServerHookInterceptor() grpc.UnaryServerInterceptor {
|
||||
return func(ctx context.Context, req any, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
return HookInterceptor(ctx, req, getCurrentUser(ctx), info.FullMethod, handler)
|
||||
return HookInterceptor(ctx, req, GetCurUserFromContextOrDefault(ctx), info.FullMethod, handler)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -66,11 +66,3 @@ func updateProxyFunctionCallMetric(fullMethod string) {
|
|||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.TotalLabel, "", "").Inc()
|
||||
metrics.ProxyFunctionCall.WithLabelValues(strconv.FormatInt(paramtable.GetNodeID(), 10), method, metrics.FailLabel, "", "").Inc()
|
||||
}
|
||||
|
||||
func getCurrentUser(ctx context.Context) string {
|
||||
username, err := GetCurUserFromContext(ctx)
|
||||
if err != nil {
|
||||
log.Warn("fail to get current user", zap.Error(err))
|
||||
}
|
||||
return username
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue