Skip to main content

AccessLogCommon

Struct AccessLogCommon 

Source
pub struct AccessLogCommon {
Show 33 fields pub sample_rate: f64, pub downstream_remote_address: Option<Address>, pub downstream_local_address: Option<Address>, pub tls_properties: Option<TlsProperties>, pub start_time: Option<Timestamp>, pub time_to_last_rx_byte: Option<Duration>, pub time_to_first_upstream_tx_byte: Option<Duration>, pub time_to_last_upstream_tx_byte: Option<Duration>, pub time_to_first_upstream_rx_byte: Option<Duration>, pub time_to_last_upstream_rx_byte: Option<Duration>, pub time_to_first_downstream_tx_byte: Option<Duration>, pub time_to_last_downstream_tx_byte: Option<Duration>, pub upstream_remote_address: Option<Address>, pub upstream_local_address: Option<Address>, pub upstream_cluster: String, pub response_flags: Option<ResponseFlags>, pub metadata: Option<Metadata>, pub upstream_transport_failure_reason: String, pub route_name: String, pub downstream_direct_remote_address: Option<Address>, pub filter_state_objects: HashMap<String, Any>, pub custom_tags: HashMap<String, String>, pub duration: Option<Duration>, pub upstream_request_attempt_count: u32, pub connection_termination_details: String, pub stream_id: String, pub intermediate_log_entry: bool, pub downstream_transport_failure_reason: String, pub downstream_wire_bytes_sent: u64, pub downstream_wire_bytes_received: u64, pub upstream_wire_bytes_sent: u64, pub upstream_wire_bytes_received: u64, pub access_log_type: i32,
}
Expand description

Defines fields that are shared by all Envoy access logs. [#next-free-field: 34]

Fields§

§sample_rate: f64

[#not-implemented-hide:] This field indicates the rate at which this log entry was sampled. Valid range is (0.0, 1.0].

§downstream_remote_address: Option<Address>

This field is the remote/origin address on which the request from the user was received. Note: This may not be the physical peer. E.g, if the remote address is inferred from for example the x-forwarder-for header, proxy protocol, etc.

§downstream_local_address: Option<Address>

This field is the local/destination address on which the request from the user was received.

§tls_properties: Option<TlsProperties>

If the connection is secure,S this field will contain TLS properties.

§start_time: Option<Timestamp>

The time that Envoy started servicing this request. This is effectively the time that the first downstream byte is received.

§time_to_last_rx_byte: Option<Duration>

Interval between the first downstream byte received and the last downstream byte received (i.e. time it takes to receive a request).

§time_to_first_upstream_tx_byte: Option<Duration>

Interval between the first downstream byte received and the first upstream byte sent. There may by considerable delta between time_to_last_rx_byte and this value due to filters. Additionally, the same caveats apply as documented in time_to_last_downstream_tx_byte about not accounting for kernel socket buffer time, etc.

§time_to_last_upstream_tx_byte: Option<Duration>

Interval between the first downstream byte received and the last upstream byte sent. There may by considerable delta between time_to_last_rx_byte and this value due to filters. Additionally, the same caveats apply as documented in time_to_last_downstream_tx_byte about not accounting for kernel socket buffer time, etc.

§time_to_first_upstream_rx_byte: Option<Duration>

Interval between the first downstream byte received and the first upstream byte received (i.e. time it takes to start receiving a response).

§time_to_last_upstream_rx_byte: Option<Duration>

Interval between the first downstream byte received and the last upstream byte received (i.e. time it takes to receive a complete response).

§time_to_first_downstream_tx_byte: Option<Duration>

Interval between the first downstream byte received and the first downstream byte sent. There may be a considerable delta between the time_to_first_upstream_rx_byte and this field due to filters. Additionally, the same caveats apply as documented in time_to_last_downstream_tx_byte about not accounting for kernel socket buffer time, etc.

§time_to_last_downstream_tx_byte: Option<Duration>

Interval between the first downstream byte received and the last downstream byte sent. Depending on protocol, buffering, windowing, filters, etc. there may be a considerable delta between time_to_last_upstream_rx_byte and this field. Note also that this is an approximate time. In the current implementation it does not include kernel socket buffer time. In the current implementation it also does not include send window buffering inside the HTTP/2 codec. In the future it is likely that work will be done to make this duration more accurate.

§upstream_remote_address: Option<Address>

The upstream remote/destination address that handles this exchange. This does not include retries.

§upstream_local_address: Option<Address>

The upstream local/origin address that handles this exchange. This does not include retries.

§upstream_cluster: String

The upstream cluster that upstream_remote_address belongs to.

§response_flags: Option<ResponseFlags>

Flags indicating occurrences during request/response processing.

§metadata: Option<Metadata>

All metadata encountered during request processing, including endpoint selection.

This can be used to associate IDs attached to the various configurations used to process this request with the access log entry. For example, a route created from a higher level forwarding rule with some ID can place that ID in this field and cross reference later. It can also be used to determine if a canary endpoint was used or not.

§upstream_transport_failure_reason: String

If upstream connection failed due to transport socket (e.g. TLS handshake), provides the failure reason from the transport socket. The format of this field depends on the configured upstream transport socket. Common TLS failures are in :ref:TLS trouble shooting <arch_overview_ssl_trouble_shooting>.

§route_name: String

The name of the route

§downstream_direct_remote_address: Option<Address>

This field is the downstream direct remote address on which the request from the user was received. Note: This is always the physical peer, even if the remote address is inferred from for example the x-forwarder-for header, proxy protocol, etc.

§filter_state_objects: HashMap<String, Any>

Map of filter state in stream info that have been configured to be logged. If the filter state serialized to any message other than google.protobuf.Any it will be packed into google.protobuf.Any.

§custom_tags: HashMap<String, String>

A list of custom tags, which annotate logs with additional information. To configure this value, users should configure :ref:custom_tags <envoy_v3_api_field_extensions.access_loggers.grpc.v3.CommonGrpcAccessLogConfig.custom_tags>.

§duration: Option<Duration>

For HTTP: Total duration in milliseconds of the request from the start time to the last byte out. For TCP: Total duration in milliseconds of the downstream connection. This is the total duration of the request (i.e., when the request’s ActiveStream is destroyed) and may be longer than time_to_last_downstream_tx_byte.

§upstream_request_attempt_count: u32

For HTTP: Number of times the request is attempted upstream. Note that the field is omitted when the request was never attempted upstream. For TCP: Number of times the connection request is attempted upstream. Note that the field is omitted when the connect request was never attempted upstream.

§connection_termination_details: String

Connection termination details may provide additional information about why the connection was terminated by Envoy for L4 reasons.

§stream_id: String

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.

§intermediate_log_entry: bool
👎Deprecated

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.

.. attention::

This field is deprecated in favor of access_log_type for better indication of the type of the access log record.

§downstream_transport_failure_reason: String

If downstream connection in listener failed due to transport socket (e.g. TLS handshake), provides the 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 <arch_overview_ssl_trouble_shooting>.

§downstream_wire_bytes_sent: u64

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.

§downstream_wire_bytes_received: u64

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.

§upstream_wire_bytes_sent: u64

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.

§upstream_wire_bytes_received: u64

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.

§access_log_type: i32

The type of the access log, which indicates when the log was recorded. See :ref:ACCESS_LOG_TYPE <config_access_log_format_access_log_type> for the available values. In case the access log was recorded by a flow which does not correspond to one of the supported values, then the default value will be NotSet. For more information about how access log behaves and when it is being recorded, please refer to :ref:access logging <arch_overview_access_logs>.

Implementations§

Source§

impl AccessLogCommon

Source

pub fn access_log_type(&self) -> AccessLogType

Returns the enum value of access_log_type, or the default if the field is set to an invalid enum value.

Source

pub fn set_access_log_type(&mut self, value: AccessLogType)

Sets access_log_type to the provided enum value.

Trait Implementations§

Source§

impl Clone for AccessLogCommon

Source§

fn clone(&self) -> AccessLogCommon

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for AccessLogCommon

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for AccessLogCommon

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Message for AccessLogCommon

Source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
Source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
Source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
Source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
Source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
Source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
Source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
Source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
Source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
Source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
Source§

impl Name for AccessLogCommon

Source§

const NAME: &'static str = "AccessLogCommon"

Simple name for this Message. This name is the same as it appears in the source .proto file, e.g. FooBar.
Source§

const PACKAGE: &'static str = "envoy.data.accesslog.v3"

Package name this message type is contained in. They are domain-like and delimited by ., e.g. google.protobuf.
Source§

fn full_name() -> String

Fully-qualified unique name for this Message. It’s prefixed with the package name and names of any parent messages, e.g. google.rpc.BadRequest.FieldViolation. By default, this is the package name followed by the message name. Fully-qualified names must be unique within a domain of Type URLs.
Source§

fn type_url() -> String

Type URL for this Message, which by default is the full name with a leading slash, but may also include a leading domain name, e.g. type.googleapis.com/google.profile.Person. This can be used when serializing into the google.protobuf.Any type.
Source§

impl PartialEq for AccessLogCommon

Source§

fn eq(&self, other: &AccessLogCommon) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for AccessLogCommon

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more