pub struct EventD { /* private fields */ }Expand description
EventD is an object that can be posted to the Datadog event stream.
Implementations§
Source§impl EventD
impl EventD
Sourcepub fn hostname(&self) -> Option<&str>
pub fn hostname(&self) -> Option<&str>
Returns the host where the event originated from.
Returns None if no hostname was set. An explicitly empty hostname is returned as Some(""), which is
distinct from no hostname: for example, it shouldn’t be replaced with a default hostname.
Sourcepub fn aggregation_key(&self) -> Option<&str>
pub fn aggregation_key(&self) -> Option<&str>
Returns the aggregation key of the event.
Sourcepub fn source_type_name(&self) -> Option<&str>
pub fn source_type_name(&self) -> Option<&str>
Returns the source type name of the event.
Sourcepub fn alert_type(&self) -> Option<AlertType>
pub fn alert_type(&self) -> Option<AlertType>
Returns the alert type of the event.
Sourcepub fn timestamp(&self) -> Option<u64>
pub fn timestamp(&self) -> Option<u64>
Returns the timestamp of the event.
This is a Unix timestamp, or the number of seconds since the Unix epoch.
Returns the tags associated with the event.
Returns the origin tags associated with the event.
Sourcepub fn with_timestamp(self, timestamp: impl Into<Option<u64>>) -> Self
pub fn with_timestamp(self, timestamp: impl Into<Option<u64>>) -> Self
Set the timestamp.
Represented as a Unix timestamp, or the number of seconds since the Unix epoch.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_timestamp(&mut self, timestamp: impl Into<Option<u64>>)
pub fn set_timestamp(&mut self, timestamp: impl Into<Option<u64>>)
Set the timestamp.
Represented as a Unix timestamp, or the number of seconds since the Unix epoch.
Sourcepub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
pub fn with_hostname(self, hostname: impl Into<Option<MetaString>>) -> Self
Set the hostname where the event originated from.
None clears the hostname. Some("") sets an explicitly empty hostname, which is distinct from no hostname.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_hostname(&mut self, hostname: impl Into<Option<MetaString>>)
pub fn set_hostname(&mut self, hostname: impl Into<Option<MetaString>>)
Set the hostname where the event originated from.
None clears the hostname. Some("") sets an explicitly empty hostname, which is distinct from no hostname.
Sourcepub fn with_aggregation_key(
self,
aggregation_key: impl Into<Option<MetaString>>,
) -> Self
pub fn with_aggregation_key( self, aggregation_key: impl Into<Option<MetaString>>, ) -> Self
Set the aggregation key of the event.
Aggregation key is use to group events together in the event stream.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_aggregation_key(
&mut self,
aggregation_key: impl Into<Option<MetaString>>,
)
pub fn set_aggregation_key( &mut self, aggregation_key: impl Into<Option<MetaString>>, )
Set the hostname where the event originated from.
Aggregation key is use to group events together in the event stream.
Sourcepub fn with_priority(self, priority: impl Into<Option<Priority>>) -> Self
pub fn with_priority(self, priority: impl Into<Option<Priority>>) -> Self
Set the priority of the event.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_priority(&mut self, priority: impl Into<Option<Priority>>)
pub fn set_priority(&mut self, priority: impl Into<Option<Priority>>)
Set the priority of the event.
Sourcepub fn with_source_type_name(
self,
source_type_name: impl Into<Option<MetaString>>,
) -> Self
pub fn with_source_type_name( self, source_type_name: impl Into<Option<MetaString>>, ) -> Self
Set the source type name of the event.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_source_type_name(
&mut self,
source_type_name: impl Into<Option<MetaString>>,
)
pub fn set_source_type_name( &mut self, source_type_name: impl Into<Option<MetaString>>, )
Set the source type name of the event.
Sourcepub fn with_alert_type(self, alert_type: impl Into<Option<AlertType>>) -> Self
pub fn with_alert_type(self, alert_type: impl Into<Option<AlertType>>) -> Self
Set the alert type of the event.
This variant is specifically for use in builder-style APIs.
Sourcepub fn set_alert_type(&mut self, alert_type: impl Into<Option<AlertType>>)
pub fn set_alert_type(&mut self, alert_type: impl Into<Option<AlertType>>)
Set the alert type name of the event.
Set the tags of the event.
This variant is specifically for use in builder-style APIs.
Set the tags of the event.
Set the origin tags of the event.
This variant is specifically for use in builder-style APIs.
Trait Implementations§
Source§impl EventKind for EventD
impl EventKind for EventD
Source§const EVENT_TYPE: EventType = EventType::EventD
const EVENT_TYPE: EventType = EventType::EventD
Source§fn into_event(self) -> Event
fn into_event(self) -> Event
Event.Source§fn try_from_event(event: Event) -> Result<Self, Event>
fn try_from_event(event: Event) -> Result<Self, Event>
Source§fn try_from_event_ref(event: &Event) -> Option<&Self>
fn try_from_event_ref(event: &Event) -> Option<&Self>
Source§fn try_from_event_mut(event: &mut Event) -> Option<&mut Self>
fn try_from_event_mut(event: &mut Event) -> Option<&mut Self>
impl StructuralPartialEq for EventD
Auto Trait Implementations§
impl Freeze for EventD
impl RefUnwindSafe for EventD
impl Send for EventD
impl Sync for EventD
impl Unpin for EventD
impl UnsafeUnpin for EventD
impl UnwindSafe for EventD
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
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>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more