pub struct TraceEvent {
pub span_name: String,
pub request_attrs: SpanAttributes,
pub response_attrs: Option<ResponseAttributes>,
}Expand description
OpenTelemetry trace event
Fields§
§span_name: StringSpan name (operation name)
request_attrs: SpanAttributesSpan attributes from request
response_attrs: Option<ResponseAttributes>Response attributes (if available)
Implementations§
Source§impl TraceEvent
impl TraceEvent
Sourcepub fn new(span_name: String, request_attrs: SpanAttributes) -> Self
pub fn new(span_name: String, request_attrs: SpanAttributes) -> Self
Create a new trace event
Sourcepub fn with_response(self, response_attrs: ResponseAttributes) -> Self
pub fn with_response(self, response_attrs: ResponseAttributes) -> Self
Add response attributes to the trace event
Trait Implementations§
Source§impl Clone for TraceEvent
impl Clone for TraceEvent
Source§fn clone(&self) -> TraceEvent
fn clone(&self) -> TraceEvent
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 moreAuto Trait Implementations§
impl Freeze for TraceEvent
impl RefUnwindSafe for TraceEvent
impl Send for TraceEvent
impl Sync for TraceEvent
impl Unpin for TraceEvent
impl UnwindSafe for TraceEvent
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