pub struct OperationTelemetry { /* private fields */ }Expand description
Shared metrics + tracing helper for handler-level observability.
Implementations§
Source§impl OperationTelemetry
impl OperationTelemetry
pub fn new( metrics: Arc<dyn RuntimeMetrics>, tracing: Arc<dyn RuntimeTracing>, ) -> Self
pub fn start_span( &self, name: &'static str, attributes: &[OtelAttribute], ) -> SpanGuard
pub fn recall_span(&self, correlation_id: &str) -> SpanGuard
pub fn store_span(&self, correlation_id: &str) -> SpanGuard
pub fn grapheme_span(&self, job_id: &str) -> SpanGuard
pub fn outbox_publish_span(&self, event_type: &str, job_id: &str) -> SpanGuard
pub fn record_recall_started(&self)
pub fn record_recall_success(&self, started: Instant)
pub fn record_recall_error(&self, started: Instant)
pub fn record_store_started(&self)
pub fn record_store_success(&self, started: Instant)
pub fn record_store_error(&self, started: Instant)
Trait Implementations§
Source§impl Clone for OperationTelemetry
impl Clone for OperationTelemetry
Source§fn clone(&self) -> OperationTelemetry
fn clone(&self) -> OperationTelemetry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for OperationTelemetry
impl !UnwindSafe for OperationTelemetry
impl Freeze for OperationTelemetry
impl Send for OperationTelemetry
impl Sync for OperationTelemetry
impl Unpin for OperationTelemetry
impl UnsafeUnpin for OperationTelemetry
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§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request