pub struct LogEntry {
pub timestamp: i64,
pub message: String,
pub severity: Option<Severity>,
pub source: Option<String>,
pub service: Option<String>,
pub id: Option<String>,
pub attributes: Option<BTreeMap<String, String>>,
pub resource: Option<BTreeMap<String, String>>,
pub trace_id: Option<String>,
pub span_id: Option<String>,
pub extensions: Option<BTreeMap<String, Value>>,
}Expand description
A single log entry normalized from any backend provider.
Core fields (timestamp, message) are always present.
Optional fields are omitted from Agent View when None or empty.
resource and extensions are only present in Full View.
Fields§
§timestamp: i64Unix timestamp in seconds.
message: StringLog message body.
severity: Option<Severity>Normalized severity level.
source: Option<String>Source identifier (hostname, IP address).
service: Option<String>Service name.
id: Option<String>Unique log entry ID (provider-specific; not all backends emit this).
attributes: Option<BTreeMap<String, String>>Structured attributes, flattened to string values.
resource: Option<BTreeMap<String, String>>Resource-level attributes (Full View only).
trace_id: Option<String>Correlated Trace ID.
span_id: Option<String>Correlated Span ID.
extensions: Option<BTreeMap<String, Value>>Provider-specific metadata (Full View only).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogEntry
impl<'de> Deserialize<'de> for LogEntry
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 LogEntry
Auto Trait Implementations§
impl Freeze for LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnsafeUnpin for LogEntry
impl UnwindSafe for LogEntry
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