Struct sozu_command_lib::proto::command::ProtobufAccessLog
source · pub struct ProtobufAccessLog {Show 19 fields
pub message: Option<String>,
pub request_id: Uint128,
pub cluster_id: Option<String>,
pub backend_id: Option<String>,
pub session_address: Option<SocketAddress>,
pub backend_address: Option<SocketAddress>,
pub protocol: String,
pub endpoint: ProtobufEndpoint,
pub client_rtt: Option<u64>,
pub server_rtt: Option<u64>,
pub service_time: u64,
pub bytes_in: u64,
pub bytes_out: u64,
pub user_agent: Option<String>,
pub tags: BTreeMap<String, String>,
pub tag: String,
pub time: Uint128,
pub request_time: Option<u64>,
pub response_time: Option<u64>,
}Expand description
An access log, meant to be passed to another agent
Fields§
§message: Option<String>error message if any
request_id: Uint128LogContext = request_id + cluster_id + backend_id
cluster_id: Option<String>id of the cluster (set of frontend, backend, routing rules)
backend_id: Option<String>id of the backend (the server to which the traffic is redirected)
session_address: Option<SocketAddress>ip and port of the client
backend_address: Option<SocketAddress>socket address of the backend server
protocol: Stringthe protocol, with SSL/TLS version, for instance “HTTPS-TLS1.1”
endpoint: ProtobufEndpointTCP or HTTP endpoint (method, path, context…)
client_rtt: Option<u64>round trip time for the client (microseconds)
server_rtt: Option<u64>round trip time for the backend (microseconds)
service_time: u64time spent on a session (microseconds)
bytes_in: u64number of bytes received from the client
bytes_out: u64number of bytes written to the client
user_agent: Option<String>value of the User-Agent header, if any
custom tags as key-values, for instance owner_id: MyOrganisation
tag: Stringshort description of which process sends the log, for instance: “WRK-02”
time: Uint128POSIX timestamp, nanoseconds
request_time: Option<u64>Entire time between first byte received and last byte of the response.
If a request ends abruptly before the last byte is transmitted,
the request_time produced is the time elapsed since the first byte received.
response_time: Option<u64>time for the backend to respond (microseconds)
Implementations§
source§impl ProtobufAccessLog
impl ProtobufAccessLog
sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Returns the value of message, or the default value if message is unset.
sourcepub fn cluster_id(&self) -> &str
pub fn cluster_id(&self) -> &str
Returns the value of cluster_id, or the default value if cluster_id is unset.
sourcepub fn backend_id(&self) -> &str
pub fn backend_id(&self) -> &str
Returns the value of backend_id, or the default value if backend_id is unset.
sourcepub fn client_rtt(&self) -> u64
pub fn client_rtt(&self) -> u64
Returns the value of client_rtt, or the default value if client_rtt is unset.
sourcepub fn server_rtt(&self) -> u64
pub fn server_rtt(&self) -> u64
Returns the value of server_rtt, or the default value if server_rtt is unset.
sourcepub fn user_agent(&self) -> &str
pub fn user_agent(&self) -> &str
Returns the value of user_agent, or the default value if user_agent is unset.
sourcepub fn request_time(&self) -> u64
pub fn request_time(&self) -> u64
Returns the value of request_time, or the default value if request_time is unset.
sourcepub fn response_time(&self) -> u64
pub fn response_time(&self) -> u64
Returns the value of response_time, or the default value if response_time is unset.
Trait Implementations§
source§impl Clone for ProtobufAccessLog
impl Clone for ProtobufAccessLog
source§fn clone(&self) -> ProtobufAccessLog
fn clone(&self) -> ProtobufAccessLog
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ProtobufAccessLog
impl Debug for ProtobufAccessLog
source§impl Default for ProtobufAccessLog
impl Default for ProtobufAccessLog
source§impl<'de> Deserialize<'de> for ProtobufAccessLog
impl<'de> Deserialize<'de> for ProtobufAccessLog
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl Hash for ProtobufAccessLog
impl Hash for ProtobufAccessLog
source§impl Message for ProtobufAccessLog
impl Message for ProtobufAccessLog
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self.source§impl Ord for ProtobufAccessLog
impl Ord for ProtobufAccessLog
source§fn cmp(&self, other: &ProtobufAccessLog) -> Ordering
fn cmp(&self, other: &ProtobufAccessLog) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ProtobufAccessLog
impl PartialEq for ProtobufAccessLog
source§fn eq(&self, other: &ProtobufAccessLog) -> bool
fn eq(&self, other: &ProtobufAccessLog) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ProtobufAccessLog
impl PartialOrd for ProtobufAccessLog
source§fn partial_cmp(&self, other: &ProtobufAccessLog) -> Option<Ordering>
fn partial_cmp(&self, other: &ProtobufAccessLog) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Serialize for ProtobufAccessLog
impl Serialize for ProtobufAccessLog
impl Eq for ProtobufAccessLog
impl StructuralPartialEq for ProtobufAccessLog
Auto Trait Implementations§
impl Freeze for ProtobufAccessLog
impl RefUnwindSafe for ProtobufAccessLog
impl Send for ProtobufAccessLog
impl Sync for ProtobufAccessLog
impl Unpin for ProtobufAccessLog
impl UnwindSafe for ProtobufAccessLog
Blanket Implementations§
source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.