opencensus-ruby
opencensus-ruby copied to clipboard
Integrate with gRPC
Implement gRPC plugin that would enable tracing for gRPC request on client and server side. It should also instrument for collecting basic stats for gRPC requests/responses. Provide an easy way to enable those stats collections. See reference implementation in Java for both tracing and stats.
One note for this issue. The gRPC's Ruby implementation support a middleware mechanism called interceptors: https://github.com/grpc/grpc/blob/master/src/ruby/lib/grpc/generic/interceptors.rb. With this mechanism, we can add the tracing and stats without the need of monkey patching.
I created a gem to integrate opencensus-ruby with gRPC. cf. https://rubygems.org/gems/grpc_opencensus_interceptor
Fow now, only the server interceptor's #request_response
method is supported. The functionality is limited, but it works well for my use.
I also created a PR based on this gem. Please take a look if you are interested in it. https://github.com/census-instrumentation/opencensus-ruby/pull/123