Configure the proxy latency filter. This filter measures the latency
incurred by the filter chain in a histogram.
The filter fields are similar to the settings for COMMON_DURATION,
introduced in Envoy 1.31.
The filter also emits the following additional dynamic metadata fields,
which you can use to augment the existing upstream options for access logging:
How to measure the request. Affects the output stats. Does not affect metadata.
measureRequestInternally
bool
When FIRST_OUTGOING (i.e. LAST_INCOMING_FIRST_OUTGOING or FIRST_INCOMING_FIRST_OUTGOING) is instead of when the first byte is sent upstream. This has the advantage of not measuring the time selected for request measurment, finish measuring proxy latency when decodeHeader for this it takes a connection to form, which may skew the P99. filter is hit instead of when the first byte is sent upstream. This has the advantage of not for this to work the filter should be inserted last, just before the router filter. measuring the time it takes a connection to form, which may skew the P99. For this to work this filter should be inserted last, just before the router filter. This has no effect if other measurement type is selected, and has no effect on how response is measured.
Whether request timing is emitted to dynamic metadata. If enabled, defaults to true.
Measurement
How to perform the latency measurement. Given an incoming request from downstream and
outging request to upstream; or incoming response from upstream and outgoing repsonse to
downstream, This outlines how to measure the latency used by the proxy.
Name
Description
LAST_INCOMING_FIRST_OUTGOING
Count from the last byte of the incoming request\response to the first byte of the outgoing request\response.
FIRST_INCOMING_FIRST_OUTGOING
Count from the first byte of the incoming request\response to the first byte of the outgoing request\response.
LAST_INCOMING_LAST_OUTGOING
Count from the last byte of the incoming request\response to the last byte of the outgoing request\response.
FIRST_INCOMING_LAST_OUTGOING
Count from the first byte of the incoming request\response to the last byte of the outgoing request\response.