From 10ddfde8e63abcca866e4d3cfeed1d5182ecd61b Mon Sep 17 00:00:00 2001 From: Tim Emiola Date: Tue, 11 Aug 2015 09:54:59 -0700 Subject: Adds grpc.primary_user_agent key during stub creation --- src/ruby/lib/grpc/generic/client_stub.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 7b2c04aa22..3640a8c050 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -28,6 +28,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require 'grpc/generic/active_call' +require 'grpc/version' # GRPC contains the General RPC module. module GRPC @@ -46,6 +47,7 @@ module GRPC fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel) return alt_chan end + kw['grpc.primary_user_agent'] = "grpc-ruby/#{VERSION}" return Core::Channel.new(host, kw) if creds.nil? fail(TypeError, '!Credentials') unless creds.is_a?(Core::Credentials) Core::Channel.new(host, kw, creds) -- cgit v1.2.3