Skip to content

Commit

Permalink
enhance: Use auto detection proto interface to fetch grpc size (#35024)
Browse files Browse the repository at this point in the history
Related to #34763

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
  • Loading branch information
congqixia authored Jul 26, 2024
1 parent ea13b97 commit 94d8f48
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/proxy/accesslog/info/grpc_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/runtime/protoiface"

"github.com/golang/protobuf/proto"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
Expand Down Expand Up @@ -167,7 +166,7 @@ func (i *GrpcAccessInfo) ResponseSize() string {
switch r := i.resp.(type) {
case SizeResponse:
size = r.XXX_Size()
case protoiface.MessageV1:
case proto.Message:
size = proto.Size(r)
default:
return Unknown
Expand Down

0 comments on commit 94d8f48

Please sign in to comment.