pub struct LogLine {
pub timestamp: String,
pub level: String,
pub target: String,
pub fields: Vec<(String, FieldValue)>,
pub spans: Vec<SpanInfo>,
}Expand description
A single structured log line emitted by a client process.
The shape mirrors the JSON format produced by tracing-subscriber’s JSON
formatter, with the level, target, and timestamp lifted into top-level
fields so the cloud can index them as columns. The remaining structured
fields and the span stack travel as Vec<(String, FieldValue)> so the
schema is closed and postcard can encode and decode it without any
deserialize_any paths.
Fields§
§timestamp: StringRFC 3339 timestamp produced at log emission time.
level: StringLog level: TRACE, DEBUG, INFO, WARN, ERROR.
target: StringLog target (typically the originating module path).
fields: Vec<(String, FieldValue)>Structured fields attached to the event. By convention, the
message field carries the human-readable text.
spans: Vec<SpanInfo>Active span stack, outermost first. Empty when no span is in scope.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogLine
impl<'de> Deserialize<'de> for LogLine
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>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for LogLine
Auto Trait Implementations§
impl Freeze for LogLine
impl RefUnwindSafe for LogLine
impl Send for LogLine
impl Sync for LogLine
impl Unpin for LogLine
impl UnwindSafe for LogLine
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more