pub struct Log { /* private fields */ }Expand description
A log event.
Implementations§
Source§impl Log
impl Log
Sourcepub fn with_message(self, message: impl Into<MetaString>) -> Self
pub fn with_message(self, message: impl Into<MetaString>) -> Self
Sets the log message.
Sourcepub fn with_ingestion_timestamp(self, timestamp_ns: u64) -> Self
pub fn with_ingestion_timestamp(self, timestamp_ns: u64) -> Self
Sets when the log entered the pipeline, in nanoseconds since the Unix epoch.
Sources set this when they create a log. It isn’t the time of the log itself, which belongs to its properties, but the time it was received, for measuring how long logs take to be sent. A timestamp of 0 means unknown.
Sourcepub fn with_status(self, status: impl Into<MetaString>) -> Self
pub fn with_status(self, status: impl Into<MetaString>) -> Self
Sets the log status.
The status is kept as it is given, without normalization. An empty status means the log has none.
Sourcepub fn with_source(self, source: impl Into<Option<MetaString>>) -> Self
pub fn with_source(self, source: impl Into<Option<MetaString>>) -> Self
Sets the log source.
Sourcepub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
pub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
Sets the hostname.
Sourcepub fn with_service(self, service: impl Into<Option<MetaString>>) -> Self
pub fn with_service(self, service: impl Into<Option<MetaString>>) -> Self
Sets the service name.
Sets the tags string.
Sourcepub fn with_additional_properties(
self,
additional_properties: impl Into<Option<HashMap<MetaString, JsonValue>>>,
) -> Self
pub fn with_additional_properties( self, additional_properties: impl Into<Option<HashMap<MetaString, JsonValue>>>, ) -> Self
Sets the additional properties map.
Sourcepub fn ingestion_timestamp(&self) -> Option<u64>
pub fn ingestion_timestamp(&self) -> Option<u64>
Returns when the log entered the pipeline, in nanoseconds since the Unix epoch, if its source recorded it.
Returns the tags, if set.
Sourcepub fn additional_properties(&self) -> &HashMap<MetaString, JsonValue>
pub fn additional_properties(&self) -> &HashMap<MetaString, JsonValue>
Returns the additional properties map.
Trait Implementations§
Source§impl EventKind for Log
impl EventKind for Log
Source§const EVENT_TYPE: EventType = EventType::Log
const EVENT_TYPE: EventType = EventType::Log
The event type.
Source§fn into_event(self) -> Event
fn into_event(self) -> Event
Wraps this value in an
Event.Source§fn try_from_event(event: Event) -> Result<Self, Event>
fn try_from_event(event: Event) -> Result<Self, Event>
Unwraps the given event if it’s of this type, or returns it unchanged if it isn’t.
Source§fn try_from_event_ref(event: &Event) -> Option<&Self>
fn try_from_event_ref(event: &Event) -> Option<&Self>
Returns a reference to the inner value of the given event, if it’s of this type.
Source§fn try_from_event_mut(event: &mut Event) -> Option<&mut Self>
fn try_from_event_mut(event: &mut Event) -> Option<&mut Self>
Returns a mutable reference to the inner value of the given event, if it’s of this type.
impl StructuralPartialEq for Log
Auto Trait Implementations§
impl Freeze for Log
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnsafeUnpin for Log
impl UnwindSafe for Log
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,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Instruments this type by attaching the given resource group token, returning a
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Instruments this type by attaching the current resource group, returning a
Tracked wrapper. Read more