Open fatsheep9146 opened 1 year ago
Related: #2782.
I think this issue is now blocked by #197
Anyone mind if I add a metrics implementation to the client interceptors?
I think interceptors are going to be deprecated soon and then removed. https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4318, https://github.com/open-telemetry/opentelemetry-go-contrib/issues/4319. Stats handlers are better - it's hard to do metrics with streaming RPCs as that would require wrapping the stream. It's very clean with stats handlers as gRPC just calls its methods.
I think interceptors are going to be deprecated soon and then removed. #4318, #4319. Stats handlers are better - it's hard to do metrics with streaming RPCs as that would require wrapping the stream. It's very clean with stats handlers as gRPC just calls its methods.
Makes sense, thanks.
Background
google.golang.org/grpc
is already instrumented with librarygo.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc
, but this library only covers trace.So this issue will try to complete all the metrics for
google.golang.org/grpc
which are already defined in https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/semantic_conventions/rpc-metrics.mdMetrics
Instruments
Server
Client
Tasks
Dockerfile
file to build example application.docker-compose.yml
to run example in a docker environment to demonstrate instrumentation.