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: 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)
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
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(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
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(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
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(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
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§impl PartialOrd for ProtobufAccessLog
impl PartialOrd for ProtobufAccessLog
Source§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§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.