access log: added support to flush tcp access log periodically (#23630)

* access log: added support to flush tcp access log periodically

Signed-off-by: wbpcode <wangbaiping@corp.netease.com>

Mirrored from https://github.com/envoyproxy/envoy @ 04dd76b051c99f82abda081e1d04cac38667ef88
pull/626/head
data-plane-api(Azure Pipelines) 2 years ago
parent 2fa9cb33f5
commit d51ac5d7ab
  1. 15
      envoy/data/accesslog/v3/accesslog.proto
  2. 9
      envoy/extensions/filters/network/tcp_proxy/v3/tcp_proxy.proto

@ -80,7 +80,7 @@ message ConnectionProperties {
}
// Defines fields that are shared by all Envoy access logs.
// [#next-free-field: 26]
// [#next-free-field: 28]
message AccessLogCommon {
option (udpa.annotations.versioning).previous_message_type =
"envoy.data.accesslog.v2.AccessLogCommon";
@ -202,6 +202,19 @@ message AccessLogCommon {
// Connection termination details may provide additional information about why the connection was terminated by Envoy for L4 reasons.
string connection_termination_details = 25;
// Optional unique id of stream (TCP connection, long-live HTTP2 stream, HTTP request) for logging and tracing.
// This could be any format string that could be used to identify one stream.
string stream_id = 26;
// If this log entry is final log entry that flushed after the stream completed or
// intermediate log entry that flushed periodically during the stream.
// There may be multiple intermediate log entries and only one final log entry for each
// long-live stream (TCP connection, long-live HTTP2 stream).
// And if it is necessary, unique ID or identifier can be added to the log entry
// :ref:`stream_id <envoy_v3_api_field_data.accesslog.v3.AccessLogCommon.stream_id>` to
// correlate all these intermediate log entries and final log entry.
bool intermediate_log_entry = 27;
}
// Flags indicating occurrences during request/response processing.

@ -24,7 +24,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
// TCP Proxy :ref:`configuration overview <config_network_filters_tcp_proxy>`.
// [#extension: envoy.filters.network.tcp_proxy]
// [#next-free-field: 15]
// [#next-free-field: 16]
message TcpProxy {
option (udpa.annotations.versioning).previous_message_type =
"envoy.config.filter.network.tcp_proxy.v2.TcpProxy";
@ -199,4 +199,11 @@ message TcpProxy {
// is reached the connection will be closed. Duration must be at least 1ms.
google.protobuf.Duration max_downstream_connection_duration = 13
[(validate.rules).duration = {gte {nanos: 1000000}}];
// The interval to flush access log. The TCP proxy will flush only one access log when the connection
// is closed by default. If this field is set, the TCP proxy will flush access log periodically with
// the specified interval.
// The interval must be at least 1ms.
google.protobuf.Duration access_log_flush_interval = 15
[(validate.rules).duration = {gte {nanos: 1000000}}];
}

Loading…
Cancel
Save