lib/grpc_prometheus/server_interceptor.rb
def client_streamer(call: nil, method: nil)
      reporter = ServerReporter.new(
        server_metrics: @server_metrics,
        method: method,
        grpc_type: GRPCType::CLIENT_STREAM,
      )
      grpc_err = nil
      yield
    rescue => err
      grpc_err = to_grpc_err(err)
      raise err
    ensure
      if grpc_err
        reporter.handled(Util::ALL_CODES[grpc_err.code])
      else
        reporter.handled(Util::ALL_CODES[::GRPC::Core::StatusCodes::OK])
      end
    end
# These metrics for streaming messages can't be collected
# with the current gRPC implementation in Ruby
#
# - grpc_server_msg_received_total
# - grpc_server_msg_sent_total
#
# Need to wait for this Pull Request to be released:
#
# - https://github.com/grpc/grpc/pull/17651
These metrics for streaming messages can't be collected
with the current gRPC implementation in Ruby



Need to wait for this Pull Request to be released.


These metrics for streaming messages can ' t be collected with the current gRPC implementation in Ruby Need to wait for this Pull Request to be released .
def client_streamer(call: nil, method: nil)
      reporter = ServerReporter.new(
        server_metrics: @server_metrics,
        method: method,
        grpc_type: GRPCType::CLIENT_STREAM,
      )
      grpc_err = nil
      yield
    rescue => err
      grpc_err = to_grpc_err(err)
      raise err
    ensure
      if grpc_err
        reporter.handled(Util::ALL_CODES[grpc_err.code])
      else
        reporter.handled(Util::ALL_CODES[::GRPC::Core::StatusCodes::OK])
      end
    end
def client_streamer ( call : nil , method : nil ) reporter = ServerReporter . new ( server_metrics : @server_metrics , method : method , grpc_type : GRPCType :: CLIENT_STREAM , ) grpc_err = nil yield rescue => err grpc_err = to_grpc_err ( err ) raise err ensure if grpc_err reporter . handled ( Util :: ALL_CODES [ grpc_err . code ] ) else reporter . handled ( Util :: ALL_CODES [ :: GRPC :: Core :: StatusCodes :: OK ] ) end end
These metrics for streaming messages can't be collected
with the current gRPC implementation in Ruby
These metrics for streaming messages can ' t be collected with the current gRPC implementation in Ruby
call
method