pub struct StreamInstrumentationRegistry { /* private fields */ }Expand description
Cloneable registry handle for instrumented stream materializations.
The registry is not consulted by ordinary streams. It is only captured by streams that
explicitly call Source::instrumented, and registration happens once per materialization.
Implementations§
Source§impl StreamInstrumentationRegistry
impl StreamInstrumentationRegistry
Sourcepub fn register(&self, name: impl Into<String>) -> StreamInstrumentationRun
pub fn register(&self, name: impl Into<String>) -> StreamInstrumentationRun
Register one materialized stream run.
This is public so a future control plane can create a run handle for work it
supervises directly. Most stream users should prefer Source::instrumented.
Sourcepub fn snapshot(
&self,
id: StreamInstrumentationId,
) -> Option<StreamInstrumentationSnapshot>
pub fn snapshot( &self, id: StreamInstrumentationId, ) -> Option<StreamInstrumentationSnapshot>
Return a snapshot for one materialized run, if it is still retained.
Sourcepub fn snapshots(&self) -> Vec<StreamInstrumentationSnapshot>
pub fn snapshots(&self) -> Vec<StreamInstrumentationSnapshot>
Return snapshots for every retained materialized run, ordered by id.
Sourcepub fn remove(&self, id: StreamInstrumentationId) -> bool
pub fn remove(&self, id: StreamInstrumentationId) -> bool
Drop a retained run from the registry.
Removing a run only affects future snapshots; existing StreamInstrumentationRun
handles continue to own their counters.
Trait Implementations§
Source§impl Clone for StreamInstrumentationRegistry
impl Clone for StreamInstrumentationRegistry
Source§fn clone(&self) -> StreamInstrumentationRegistry
fn clone(&self) -> StreamInstrumentationRegistry
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 moreSource§impl Default for StreamInstrumentationRegistry
impl Default for StreamInstrumentationRegistry
Source§fn default() -> StreamInstrumentationRegistry
fn default() -> StreamInstrumentationRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for StreamInstrumentationRegistry
impl RefUnwindSafe for StreamInstrumentationRegistry
impl Send for StreamInstrumentationRegistry
impl Sync for StreamInstrumentationRegistry
impl Unpin for StreamInstrumentationRegistry
impl UnsafeUnpin for StreamInstrumentationRegistry
impl UnwindSafe for StreamInstrumentationRegistry
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> Message for T
impl<T> Message for T
Source§fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
fn from_boxed(m: BoxedMessage) -> Result<Self, BoxedDowncastErr>
Convert a BoxedMessage to this concrete type
Source§fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
fn box_message(self, pid: &ActorId) -> Result<BoxedMessage, BoxedDowncastErr>
Convert this message to a BoxedMessage