That is one way. For more precise (but about as accurate) numbers, consider using a ClientStreamTracer, which you can set on the ManagedChannelBuilder. That has more fine-grained events about an RPC.
On Wednesday, November 28, 2018 at 1:55:12 PM UTC-8, Yee-Ning Cheng wrote: > > I am trying to measure gRPC unary requests from a client. > > I have implemented an interceptor very similar to > > > https://github.com/grpc-ecosystem/java-grpc-prometheus/blob/master/src/main/java/me/dinowernli/grpc/prometheus/MonitoringClientCallListener.java > > I also have a metric surrounding the client call and this time is much > lower than the time measured from the interceptor. > > Is the above interceptor implementation the correct way to measure each > unary request from the client? > > Thanks > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+unsubscr...@googlegroups.com. To post to this group, send email to grpc-io@googlegroups.com. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/6d46c517-f86d-45b7-aa07-494cbf385e7d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.