pub struct LogContext<'a> {
pub session_id: Ulid,
pub request_id: Option<Ulid>,
pub cluster_id: Option<&'a str>,
pub backend_id: Option<&'a str>,
}Expand description
Prefix block attached to every log line. Rendered as
[<session_id> <request_id_or_-> <cluster_id_or_-> <backend_id_or_->]
so operators can grep a full TCP/TLS session (session_id) or drill
into one HTTP exchange (request_id).
session_idis generated once per mio-accepted socket and survives protocol upgrades (expect-proxy, TLS handshake, H1↔H2 multiplexing).request_idis per-request: distinct for each H2 stream, and regenerated on each H1 keep-alive exchange.
Fields§
§session_id: Ulid§request_id: Option<Ulid>§cluster_id: Option<&'a str>§backend_id: Option<&'a str>Trait Implementations§
Source§impl<'a> Debug for LogContext<'a>
impl<'a> Debug for LogContext<'a>
Auto Trait Implementations§
impl<'a> Freeze for LogContext<'a>
impl<'a> RefUnwindSafe for LogContext<'a>
impl<'a> Send for LogContext<'a>
impl<'a> Sync for LogContext<'a>
impl<'a> Unpin for LogContext<'a>
impl<'a> UnsafeUnpin for LogContext<'a>
impl<'a> UnwindSafe for LogContext<'a>
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
Mutably borrows from an owned value. Read more