lib/instana/instrumentation/grpc.rb in instana-1.193.2 vs lib/instana/instrumentation/grpc.rb in instana-1.193.3.pre1

- old
+ new

@@ -1,9 +1,9 @@ call_types = [:request_response, :client_streamer, :server_streamer, :bidi_streamer] -if defined?(GRPC::ActiveCall) && ::Instana.config[:grpc][:enabled] - module Instana +module Instana + module Instrumentation module GRPCCientInstrumentation CALL_TYPES = [:request_response, :client_streamer, :server_streamer, :bidi_streamer] CALL_TYPES.each do |call_type| define_method(call_type) do |method, *others, **options| @@ -40,17 +40,14 @@ end end end end end - - ::Instana.logger.debug 'Instrumenting GRPC client' - ::GRPC::ClientStub.prepend(::Instana::GRPCCientInstrumentation) end -if defined?(GRPC::RpcDesc) && ::Instana.config[:grpc][:enabled] - module Instana +module Instana + module Instrumentation module GRPCServerInstrumentation CALL_TYPES = [:request_response, :client_streamer, :server_streamer, :bidi_streamer] CALL_TYPES.each do |call_type| define_method(:"handle_#{call_type}") do |active_call, mth, *others| @@ -86,9 +83,6 @@ end end end end end - - ::Instana.logger.debug 'Instrumenting GRPC server' - ::GRPC::RpcDesc.prepend(::Instana::GRPCServerInstrumentation) end