grpchan
grpchan copied to clipboard
Support stats handler
I'd like to use OpenTelemetry to track the calls made via grpchan. The otelgrpc package go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc has marked its interceptor-based implementations as deprecated, favouring the google.golang.org/grpc/stats.Handler API, but grpchan doesn't currently support this API. Could support for stats.Handler be added?
Although I was thinking about server stats handler when I made the issue, the same request applies to client stats handler. In particular, because grpchan blocks context values from crossing from the client to the server, something like the otelgrpc client stats handler is needed to place trace values in the grpc metdata so that trace context is propagated across the grpchan call.
#83