opencensus-ruby icon indicating copy to clipboard operation
opencensus-ruby copied to clipboard

Integrate with gRPC

Open jparsana opened this issue 6 years ago • 2 comments

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.

jparsana avatar Oct 15 '18 15:10 jparsana

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.

0x2c7 avatar Oct 15 '18 16:10 0x2c7

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

south37 avatar Jan 20 '20 12:01 south37