Struct opentelemetry_api::logs::LogRecordBuilder
source · pub struct LogRecordBuilder { /* private fields */ }
Expand description
A builder for LogRecord
values.
Implementations§
source§impl LogRecordBuilder
impl LogRecordBuilder
sourcepub fn with_timestamp(self, timestamp: SystemTime) -> Self
pub fn with_timestamp(self, timestamp: SystemTime) -> Self
Assign timestamp
sourcepub fn with_observed_timestamp(self, timestamp: SystemTime) -> Self
pub fn with_observed_timestamp(self, timestamp: SystemTime) -> Self
Assign observed timestamp
sourcepub fn with_span_context(self, span_context: &SpanContext) -> Self
pub fn with_span_context(self, span_context: &SpanContext) -> Self
Assign the record’s TraceContext
sourcepub fn with_context<T>(self, context: &T) -> Selfwhere
T: TraceContextExt,
pub fn with_context<T>(self, context: &T) -> Selfwhere T: TraceContextExt,
Assign the record’s TraceContext
from a TraceContextExt
trait
sourcepub fn with_severity_text<T>(self, severity: T) -> Selfwhere
T: Into<Cow<'static, str>>,
pub fn with_severity_text<T>(self, severity: T) -> Selfwhere T: Into<Cow<'static, str>>,
Assign severity text
sourcepub fn with_severity_number(self, severity: Severity) -> Self
pub fn with_severity_number(self, severity: Severity) -> Self
Assign severity number
sourcepub fn with_attributes(self, attributes: Vec<(Key, AnyValue)>) -> Self
pub fn with_attributes(self, attributes: Vec<(Key, AnyValue)>) -> Self
Assign attributes. The SDK doesn’t carry on any deduplication on these attributes.
Trait Implementations§
source§impl Clone for LogRecordBuilder
impl Clone for LogRecordBuilder
source§fn clone(&self) -> LogRecordBuilder
fn clone(&self) -> LogRecordBuilder
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 LogRecordBuilder
impl Debug for LogRecordBuilder
Auto Trait Implementations§
impl RefUnwindSafe for LogRecordBuilder
impl Send for LogRecordBuilder
impl Sync for LogRecordBuilder
impl Unpin for LogRecordBuilder
impl UnwindSafe for LogRecordBuilder
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