Struct TransactionContextBuilder
pub struct TransactionContextBuilder { /* private fields */ }
Expand description
A transaction context builder created by TransactionContext::builder
.
Implementations§
§impl TransactionContextBuilder
impl TransactionContextBuilder
pub fn with_name(self, name: String) -> TransactionContextBuilder
pub fn with_name(self, name: String) -> TransactionContextBuilder
Defines the name of the transaction.
pub fn with_op(self, op: String) -> TransactionContextBuilder
pub fn with_op(self, op: String) -> TransactionContextBuilder
Defines the operation of the transaction.
pub fn with_trace_id(self, trace_id: TraceId) -> TransactionContextBuilder
pub fn with_trace_id(self, trace_id: TraceId) -> TransactionContextBuilder
Defines the trace ID.
pub fn with_parent_span_id(
self,
parent_span_id: Option<SpanId>,
) -> TransactionContextBuilder
pub fn with_parent_span_id( self, parent_span_id: Option<SpanId>, ) -> TransactionContextBuilder
Defines a parent span ID for the created transaction.
pub fn with_span_id(self, span_id: SpanId) -> TransactionContextBuilder
pub fn with_span_id(self, span_id: SpanId) -> TransactionContextBuilder
Defines the span ID to be used when creating the transaction.
pub fn with_sampled(self, sampled: Option<bool>) -> TransactionContextBuilder
pub fn with_sampled(self, sampled: Option<bool>) -> TransactionContextBuilder
Defines whether the transaction will be sampled.
pub fn with_custom(self, key: String, value: Value) -> TransactionContextBuilder
pub fn with_custom(self, key: String, value: Value) -> TransactionContextBuilder
Adds a custom key and value to the transaction context.
pub 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