context: add response.total_size#9839
Conversation
Signed-off-by: Kuat Yessenov <kuat@google.com>
|
@PiotrSikora @lizan this is blocking istio 1.5 release. |
| response.headers, string map, All response headers | ||
| response.trailers, string map, All response trailers | ||
| response.size, int, Size of the response body | ||
| response.total_size, int, Total size of the response including the headers and the trailers |
There was a problem hiding this comment.
Unpacked or on the wire (i.e. does it account for HPACK/QPACK, chunked encoding, etc.)?
There was a problem hiding this comment.
I had the same question. I'm using bytes() property of the header map. I think it's reporting the compressed size, since the numbers don't seem to add up.
There was a problem hiding this comment.
Hmm, I thought that bytes() is used to make sure that uncompressed headers don't exceed the configured limit, so that shouldn't be the case.
@asraa you're the authority here, any ideas?
There was a problem hiding this comment.
bytes() is approximate uncompressed size.
There was a problem hiding this comment.
FWIW existing code uses the same method to get the sizes: https://github.com/istio/proxy/blob/master/src/envoy/http/mixer/filter.cc#L61. So far noone complained that it's not precise.
There was a problem hiding this comment.
This looks fine to me in general, so will defer to all of you if you want different doc text or you want to go with this.
There was a problem hiding this comment.
I think it would be helpful to clarify that this is "approximate uncompressed size of headers and trailers" and not the wire size.
There was a problem hiding this comment.
Sure, updated the doc.
Signed-off-by: Kuat Yessenov <kuat@google.com>
Cherry-pick of envoyproxy#9839
Signed-off-by: Kuat Yessenov <kuat@google.com>
Signed-off-by: Kuat Yessenov kuat@google.com
Description: define response.total_size. It is used via Wasm ABI in an istio telemetry extension, and we noticed it's missing.
Risk Level: low
Testing: unit
Docs Changes: list of properties updated
Release Notes: none