Client Timestamp

38 views
Skip to first unread message

vicva...@gmail.com

unread,
Jan 26, 2018, 10:36:59 PM1/26/18
to grpc.io
Hi Guys,

I am writing a grpc based library with built in support for metrics capturing among other things.
The idea is that an interceptor on the server will capture metrics before and after the call it delegated the the intended service.

That's working fine but how do I find the timestamp when the client initiated the call to calculate the end to end latency.
Is this something that needs to be added as another interceptor on the client side?
If so, what's the best place to put the timestamp, in the header I suppose?

Or is there an easier way (in built by grpc) to access the timestamp from the client?

Cheers

Kun Zhang

unread,
Jan 30, 2018, 5:12:17 PM1/30/18
to grpc.io
What language of gRPC?

vicva...@gmail.com

unread,
Jan 30, 2018, 10:50:00 PM1/30/18
to grpc.io
I am using java

Kun Zhang

unread,
Feb 7, 2018, 2:05:24 PM2/7/18
to grpc.io
If I understand correctly, your server interceptor wants to know the time when the RPC is started on the client.
Yes you can write a client interceptor that adds the timestamp to the headers.

On Tuesday, January 30, 2018 at 7:50:00 PM UTC-8, vicva...@gmail.com wrote:
I am using java
Reply all
Reply to author
Forward
0 new messages