pub struct RecorderSlot(/* private fields */);Expand description
A connector’s slot for the recorder the pipeline installs (#638 / #704).
Connectors keep one of these in their struct and forward
set_roundtrip_recorder to
install; every call site then does
self.roundtrips.record("get") without checking whether a pipeline
installed anything. First install wins — the pipeline installs exactly
once per run, and a re-used connector instance keeps the labels it is
already counting under.
Implementations§
Source§impl RecorderSlot
impl RecorderSlot
pub const fn new() -> Self
Sourcepub fn install(&self, recorder: Arc<RoundtripRecorder>)
pub fn install(&self, recorder: Arc<RoundtripRecorder>)
Install the pipeline’s recorder (no-op when one is already installed).
Sourcepub fn recorder(&self) -> Option<Arc<RoundtripRecorder>>
pub fn recorder(&self) -> Option<Arc<RoundtripRecorder>>
The installed recorder, for handing to a helper that performs I/O on the connector’s behalf.
Sourcepub fn record_timed(&self, op: &'static str, elapsed: Duration)
pub fn record_timed(&self, op: &'static str, elapsed: Duration)
Count one timed round trip when a recorder is installed.
Sourcepub fn replication_key_missing(&self, n: u64)
pub fn replication_key_missing(&self, n: u64)
Count records missing their replication key when a recorder is installed.
Sourcepub fn retry(&self, class: RetryClass)
pub fn retry(&self, class: RetryClass)
Count one retry of class when a recorder is installed.
Sourcepub fn throttle_wait_timer(&self) -> ThrottleWait
pub fn throttle_wait_timer(&self) -> ThrottleWait
Start timing a rate-limit sleep (ThrottleWait).
Trait Implementations§
Source§impl Debug for RecorderSlot
impl Debug for RecorderSlot
Auto Trait Implementations§
impl !Freeze for RecorderSlot
impl RefUnwindSafe for RecorderSlot
impl Send for RecorderSlot
impl Sync for RecorderSlot
impl Unpin for RecorderSlot
impl UnsafeUnpin for RecorderSlot
impl UnwindSafe for RecorderSlot
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> ⓘ
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> ⓘ
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>
T in a tonic::Request