opencensus-ruby
opencensus-ruby copied to clipboard
Add gRPC server interceptor
WHY
I want to use opencensus with gRPC server. Discussion on this topic was found in https://github.com/census-instrumentation/opencensus-ruby/issues/79 , but I couldn't find any implementation.
WHAT
I implemented GrpcServerInterceptor. By using this, we can send spans to each exporter.
In this implementation, span names and span statuses are set according to the following document. cf. https://github.com/census-instrumentation/opencensus-specs/blob/master/trace/gRPC.md
Each span also has some useful attributes (e.g. http.path, http.method, http.user_agent, etc.).
So far I have only implemented the server interceptor, but in the future, I will also implement the client interceptor.