Struct datadog_api_client::datadogV1::model::model_log_content::LogContent
source · #[non_exhaustive]pub struct LogContent {
pub attributes: Option<BTreeMap<String, Value>>,
pub host: Option<String>,
pub message: Option<String>,
pub service: Option<String>,
pub tags: Option<Vec<String>>,
pub timestamp: Option<DateTime<Utc>>,
/* 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.
Array of tags associated with your log.
timestamp: Option<DateTime<Utc>>
Timestamp of your log.
Implementations§
source§impl LogContent
impl LogContent
pub fn new() -> LogContent
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 timestamp(self, value: DateTime<Utc>) -> Self
Trait Implementations§
source§impl Clone for LogContent
impl Clone for LogContent
source§fn clone(&self) -> LogContent
fn clone(&self) -> LogContent
Returns a copy 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 LogContent
impl Debug for LogContent
source§impl Default for LogContent
impl Default for LogContent
source§impl<'de> Deserialize<'de> for LogContent
impl<'de> Deserialize<'de> for LogContent
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 LogContent
impl PartialEq for LogContent
source§fn eq(&self, other: &LogContent) -> bool
fn eq(&self, other: &LogContent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for LogContent
impl Serialize for LogContent
impl StructuralPartialEq for LogContent
Auto Trait Implementations§
impl Freeze for LogContent
impl RefUnwindSafe for LogContent
impl Send for LogContent
impl Sync for LogContent
impl Unpin for LogContent
impl UnwindSafe for LogContent
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)