Client Time Histogram for bidi_stream
davejohnston opened this issue · comments
It looks like after adding EnableClientHandlingTimeHistogram() I can collect counters for unary rpc messages, but there is not reporting on bidirectional streams.
Is this intentional, or a bug?
A bi-directional stream should by definition always be long lasting, what would the histogram reflect?
I was hoping to be able to use it to calculate the average number of messages sent over the stream per second, over a period of time.
I think that's reasonable, but that would be accomplished with a counter, as you use the rate
function over the monotonically increasing counter value, thus yielding the messages per second. This is already available with these metrics:
go-grpc-prometheus/client_metrics.go
Lines 44 to 54 in c225b8c
Thanks - looks like the irate() function with the above counter solves my issue.