pub struct TransactionContextBuilder { /* private fields */ }
Expand description
A transaction context builder created by TransactionContext::builder
.
Implementations§
Source§impl TransactionContextBuilder
impl TransactionContextBuilder
Sourcepub fn with_trace_id(self, trace_id: TraceId) -> Self
pub fn with_trace_id(self, trace_id: TraceId) -> Self
Defines the trace ID.
Sourcepub fn with_parent_span_id(self, parent_span_id: Option<SpanId>) -> Self
pub fn with_parent_span_id(self, parent_span_id: Option<SpanId>) -> Self
Defines a parent span ID for the created transaction.
Sourcepub fn with_span_id(self, span_id: SpanId) -> Self
pub fn with_span_id(self, span_id: SpanId) -> Self
Defines the span ID to be used when creating the transaction.
Sourcepub fn with_sampled(self, sampled: Option<bool>) -> Self
pub fn with_sampled(self, sampled: Option<bool>) -> Self
Defines whether the transaction will be sampled.
Sourcepub fn with_custom(self, key: String, value: Value) -> Self
pub fn with_custom(self, key: String, value: Value) -> Self
Adds a custom key and value to the transaction context.
Sourcepub fn finish(self) -> TransactionContext
pub fn finish(self) -> TransactionContext
Finishes building a transaction.
Auto Trait Implementations§
impl Freeze for TransactionContextBuilder
impl RefUnwindSafe for TransactionContextBuilder
impl Send for TransactionContextBuilder
impl Sync for TransactionContextBuilder
impl Unpin for TransactionContextBuilder
impl UnwindSafe for TransactionContextBuilder
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