A filter to export statistics for HTTP streaming requests and responses.
A streaming request/response is an HTTP request/response with isChunked set to true.
This filter is included in HTTP stack by default, all metrics defined in this filter are only
populated for HTTP streaming requests/responses.
Stats:
---------------Request Stream------------
stream/request/duration_ms:
A histogram of the duration of the lifetime of request streams, from the time a stream is
initialized until it's closed, in milliseconds.
---------------Response Stream-----------
stream/response/duration_ms:
A histogram of the duration of the lifetime of response streams, from the time a stream is
initialized until it's closed, in milliseconds.
Counters:
---------------Request Stream------------
stream/request/closed:
A counter of the number of closed request streams.
stream/request/failures
A counter of the number of times any failure has been observed in the middle of a request
stream.
stream/request/failures/<exception_name>:
A counter of the number of times a specific exception has been thrown in the middle of a
request stream.
stream/request/opened:
A counter of the number of opened request streams.
---------------Response Stream-----------
stream/response/closed:
A counter of the number of closed response streams.
stream/response/failures
A counter of the number of times any failure has been observed in the middle of a response
stream.
stream/response/failures/<exception_name>:
A counter of the number of times a specific exception has been thrown in the middle of a
response stream.
stream/response/opened:
A counter of the number of opened response streams.
Gauges:
---------------Request Stream------------
stream/request/pending:
A gauge of the number of pending request streams.
---------------Response Stream------------
stream/response/pending:
A gauge of the number of pending response streams.
You could derive the streaming success rate of:
the total number of streams
number of successful streams divided by number of total streams
closed streams
number of successful streams divided by number of closed streams
Here we assume a success stream as a stream terminated without an exception or a stream that has
not terminated yet.
Take request stream as an example, assuming your counters are not "latched", which means that
their values are monotonically increasing:
Success rate of total number of streams:
1 - (rated_counter(stream/request/failures)
/ (gauge(stream/request/pending) + rated_counter(stream/request/closed)))
Success rate of number of closed streams:
1 - (rated_counter(stream/request/failures) / rated_counter(stream/request/closed))
A filter to export statistics for HTTP streaming requests and responses. A streaming request/response is an HTTP request/response with
isChunked
set to true.This filter is included in HTTP stack by default, all metrics defined in this filter are only populated for HTTP streaming requests/responses.
Stats: ---------------Request Stream------------
You could derive the streaming success rate of:
Take request stream as an example, assuming your counters are not "latched", which means that their values are monotonically increasing: