pub struct LogEntry {
pub http_request: Option<HttpRequest>,
pub insert_id: Option<String>,
pub labels: Option<HashMap<String, String>>,
pub name: Option<String>,
pub operation: Option<LogEntryOperation>,
pub proto_payload: Option<HashMap<String, Value>>,
pub severity: Option<String>,
pub source_location: Option<LogEntrySourceLocation>,
pub struct_payload: Option<HashMap<String, Value>>,
pub text_payload: Option<String>,
pub timestamp: Option<DateTime<Utc>>,
pub trace: Option<String>,
}
Expand description
An individual log entry.
This type is not used in any activity, and only used as part of another schema.
Fields§
§http_request: Option<HttpRequest>
Optional. Information about the HTTP request associated with this log entry, if applicable.
insert_id: Option<String>
A unique ID for the log entry used for deduplication. If omitted, the implementation will generate one based on operation_id.
labels: Option<HashMap<String, String>>
A set of user-defined (key, value) data that provides additional information about the log entry.
name: Option<String>
Required. The log to which this log entry belongs. Examples: "syslog"
, "book_log"
.
operation: Option<LogEntryOperation>
Optional. Information about an operation associated with the log entry, if applicable.
proto_payload: Option<HashMap<String, Value>>
The log entry payload, represented as a protocol buffer that is expressed as a JSON object. The only accepted type currently is AuditLog.
severity: Option<String>
The severity of the log entry. The default value is LogSeverity.DEFAULT
.
source_location: Option<LogEntrySourceLocation>
Optional. Source code location information associated with the log entry, if any.
struct_payload: Option<HashMap<String, Value>>
The log entry payload, represented as a structure that is expressed as a JSON object.
text_payload: Option<String>
The log entry payload, represented as a Unicode string (UTF-8).
timestamp: Option<DateTime<Utc>>
The time the event described by the log entry occurred. If omitted, defaults to operation start time.
trace: Option<String>
Optional. Resource name of the trace associated with the log entry, if any. If this field contains a relative resource name, you can assume the name is relative to //tracing.googleapis.com
. Example: projects/my-projectid/traces/06796866738c859f2f19b7cfb3214824
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>,
impl Part 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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>
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