Golang GRPC Dial WithUserAgent option appends "grpc-go/1.10.0" to it.

23 views
Skip to first unread message

bhna...@colorado.edu

unread,
Mar 11, 2018, 1:42:22 AM3/11/18
to grpc.io
Hi,

I'm trying to  make a grpc dial on the client side with my own user-agent string. So I'm using the WithUserAgent option as shown below:

dialWithUserAgent := grpc.Dial("target", grpc.WithUserAgent("user-agent"))
However, when I extract this from the server side (from the context - metadata), I have the "grpc-go/1.10.0" getting appended with my "user-agent". Is there a way for me to avoid this?

 My current user-agent string from the context looks like this:

user-agent:[user-agent grpc-go/1.10.0]]

Carl Mastrangelo

unread,
Mar 15, 2018, 4:41:12 PM3/15/18
to grpc.io
I don't believe we support removing the grpc library user agent.  If you would like, you can add an addition agent field to your requests by using the metadata API, and that will allow you full control over the header.
Reply all
Reply to author
Forward
0 new messages