From c6aed655a8932643fcec83af54fe35b1600399ca Mon Sep 17 00:00:00 2001 From: "data-plane-api(Azure Pipelines)" Date: Tue, 28 Mar 2023 11:40:30 +0000 Subject: [PATCH] accesslog: add fields to data.accesslog.v3.AccessLogCommon (#25575) * accesslog: add fields to ALS proto Signed-off-by: Lex Herbert * update code to match proto changes Signed-off-by: Lex Herbert * address PR feedback Signed-off-by: Lex Herbert --------- Signed-off-by: Lex Herbert Mirrored from https://github.com/envoyproxy/envoy @ a565b6e68ab269540a16c03fa5a6183d0cb3094f --- envoy/data/accesslog/v3/accesslog.proto | 38 ++++++++++++++++++++++--- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/envoy/data/accesslog/v3/accesslog.proto b/envoy/data/accesslog/v3/accesslog.proto index 2b6d2c2e..f74391c7 100644 --- a/envoy/data/accesslog/v3/accesslog.proto +++ b/envoy/data/accesslog/v3/accesslog.proto @@ -80,7 +80,7 @@ message ConnectionProperties { } // Defines fields that are shared by all Envoy access logs. -// [#next-free-field: 29] +// [#next-free-field: 33] message AccessLogCommon { option (udpa.annotations.versioning).previous_message_type = "envoy.data.accesslog.v2.AccessLogCommon"; @@ -220,6 +220,22 @@ message AccessLogCommon { // failure reason from the transport socket. The format of this field depends on the configured downstream // transport socket. Common TLS failures are in :ref:`TLS trouble shooting `. string downstream_transport_failure_reason = 28; + + // For HTTP: Total number of bytes sent to the downstream by the http stream. + // For TCP: Total number of bytes sent to the downstream by the tcp proxy. + uint64 downstream_wire_bytes_sent = 29; + + // For HTTP: Total number of bytes received from the downstream by the http stream. Envoy over counts sizes of received HTTP/1.1 pipelined requests by adding up bytes of requests in the pipeline to the one currently being processed. + // For TCP: Total number of bytes received from the downstream by the tcp proxy. + uint64 downstream_wire_bytes_received = 30; + + // For HTTP: Total number of bytes sent to the upstream by the http stream. This value accumulates during upstream retries. + // For TCP: Total number of bytes sent to the upstream by the tcp proxy. + uint64 upstream_wire_bytes_sent = 31; + + // For HTTP: Total number of bytes received from the upstream by the http stream. + // For TCP: Total number of bytes sent to the upstream by the tcp proxy. + uint64 upstream_wire_bytes_received = 32; } // Flags indicating occurrences during request/response processing. @@ -389,7 +405,7 @@ message TLSProperties { string ja3_fingerprint = 7; } -// [#next-free-field: 14] +// [#next-free-field: 16] message HTTPRequestProperties { option (udpa.annotations.versioning).previous_message_type = "envoy.data.accesslog.v2.HTTPRequestProperties"; @@ -443,9 +459,17 @@ message HTTPRequestProperties { // Map of additional headers that have been configured to be logged. map request_headers = 13; + + // Number of header bytes sent to the upstream by the http stream, including protocol overhead. + // + // This value accumulates during upstream retries. + uint64 upstream_header_bytes_sent = 14; + + // Number of header bytes received from the downstream by the http stream, including protocol overhead. + uint64 downstream_header_bytes_received = 15; } -// [#next-free-field: 7] +// [#next-free-field: 9] message HTTPResponseProperties { option (udpa.annotations.versioning).previous_message_type = "envoy.data.accesslog.v2.HTTPResponseProperties"; @@ -456,7 +480,7 @@ message HTTPResponseProperties { // Size of the HTTP response headers in bytes. // // This value is captured from the OSI layer 7 perspective, i.e. it does not - // include overhead from framing or encoding at other networking layers. + // include protocol overhead or overhead from framing or encoding at other networking layers. uint64 response_headers_bytes = 2; // Size of the HTTP response body in bytes. @@ -473,4 +497,10 @@ message HTTPResponseProperties { // The HTTP response code details. string response_code_details = 6; + + // Number of header bytes received from the upstream by the http stream, including protocol overhead. + uint64 upstream_header_bytes_received = 7; + + // Number of header bytes sent to the downstream by the http stream, including protocol overhead. + uint64 downstream_header_bytes_sent = 8; }