Struct sozu_command_lib::proto::command::ProtobufAccessLog
source · pub struct ProtobufAccessLog {Show 18 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 response_time: 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,
}
Expand description
An access log, meant to be passed to another agent
Fields§
§message: Option<String>
error message if any
request_id: Uint128
LogContext = 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: String
the protocol, with SSL/TLS version, for instance “HTTPS-TLS1.1”
endpoint: ProtobufEndpoint
TCP 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)
response_time: u64
time for the backend to respond (microseconds)
service_time: u64
time spent on a session (microseconds)
bytes_in: u64
number of bytes received from the client
bytes_out: u64
number 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: String
short description of which process sends the log, for instance: “WRK-02”
time: Uint128
POSIX timestamp, nanoseconds
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.
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<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.