#[non_exhaustive]pub struct LogAttributes {
pub attributes: Option<BTreeMap<String, Value>>,
pub host: Option<String>,
pub message: Option<String>,
pub service: Option<String>,
pub status: Option<String>,
pub tags: Option<Vec<String>>,
pub timestamp: Option<DateTime<Utc>>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
JSON object containing all log attributes and their associated values.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.attributes: Option<BTreeMap<String, Value>>
JSON object of attributes from your log.
host: Option<String>
Name of the machine from where the logs are being sent.
message: Option<String>
The message reserved attribute of your log. By default, Datadog ingests the value of the message attribute as the body of the log entry. That value is then highlighted and displayed in the Logstream, where it is indexed for full text search.
service: Option<String>
The name of the application or service generating the log events. It is used to switch from Logs to APM, so make sure you define the same value when you use both products.
status: Option<String>
Status of the message associated with your log.
Array of tags associated with your log.
timestamp: Option<DateTime<Utc>>
Timestamp of your log.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl LogAttributes
impl LogAttributes
pub fn new() -> LogAttributes
pub fn attributes(self, value: BTreeMap<String, Value>) -> Self
pub fn host(self, value: String) -> Self
pub fn message(self, value: String) -> Self
pub fn service(self, value: String) -> Self
pub fn status(self, value: String) -> Self
pub fn timestamp(self, value: DateTime<Utc>) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for LogAttributes
impl Clone for LogAttributes
Source§fn clone(&self) -> LogAttributes
fn clone(&self) -> LogAttributes
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LogAttributes
impl Debug for LogAttributes
Source§impl Default for LogAttributes
impl Default for LogAttributes
Source§impl<'de> Deserialize<'de> for LogAttributes
impl<'de> Deserialize<'de> for LogAttributes
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
Source§impl PartialEq for LogAttributes
impl PartialEq for LogAttributes
Source§impl Serialize for LogAttributes
impl Serialize for LogAttributes
impl StructuralPartialEq for LogAttributes
Auto Trait Implementations§
impl Freeze for LogAttributes
impl RefUnwindSafe for LogAttributes
impl Send for LogAttributes
impl Sync for LogAttributes
impl Unpin for LogAttributes
impl UnwindSafe for LogAttributes
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