Struct QlogRecorder
pub struct QlogRecorder { /* private fields */ }quic and std only.Expand description
A cloneable handle to one worker. Clones share the destination and recording gate. Keep a handle to await completion; dropping it never waits for output.
Implementations§
§impl QlogRecorder
impl QlogRecorder
pub fn state(&self) -> RecorderState
pub fn state(&self) -> RecorderState
Current task lifecycle; use Self::is_enabled to check the recording gate too.
pub fn is_enabled(&self) -> bool
pub fn is_enabled(&self) -> bool
Whether the recording gate is enabled and the task still accepts events.
A true result does not guarantee available queue capacity.
pub fn set_enabled(&self, enabled: bool)
pub fn set_enabled(&self, enabled: bool)
Change admission for all attached connections. Already submitted events still drain. Re-enabling records subsequent observations only; it does not recreate missed history or restart a closed or failed task.
pub fn stats(&self) -> RecorderStats
pub fn stats(&self) -> RecorderStats
Read admission counters and current storage use without waiting for output. Concurrent activity can change individual fields while this snapshot is read.
pub fn error(&self) -> Option<Error>
pub fn error(&self) -> Option<Error>
The first published output or task failure, if any. Reading the error does not consume it or retry partially written records.
pub async fn flush(&self) -> Result<(), Error>
pub async fn flush(&self) -> Result<(), Error>
Wait until every event submitted before this command has been processed and output
flushed. In history mode this retains events; use Self::dump_recent to write them.
Also reports output initialization failure.
§impl QlogRecorder
impl QlogRecorder
pub async fn dump_recent(&self, group: ConnectionId) -> Result<(), Error>
pub async fn dump_recent(&self, group: ConnectionId) -> Result<(), Error>
Write, consume and flush retained observations for the given connection group.
Use the connection’s trace_id() when retaining a recorder inside composed sinks.
Requires history recording; the request is ordered after previously submitted events.
Cancelling the waiter does not retract a command already submitted to the task.
Trait Implementations§
§impl Clone for QlogRecorder
impl Clone for QlogRecorder
§fn clone(&self) -> QlogRecorder
fn clone(&self) -> QlogRecorder
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for QlogRecorder
impl Debug for QlogRecorder
§impl QlogSink for QlogRecorder
impl QlogSink for QlogRecorder
§fn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
§fn generation(&self) -> u64
fn generation(&self) -> u64
§fn accepts_named(&self, schema: &EventSchema) -> bool
fn accepts_named(&self, schema: &EventSchema) -> bool
schema; checked before building them.§fn emit_named(&self, event: &NamedQlogEventView<'_>)
fn emit_named(&self, event: &NamedQlogEventView<'_>)
§fn emit(&self, event: &QlogEventView<'_>) -> bool
fn emit(&self, event: &QlogEventView<'_>) -> bool
§fn filtered<F>(self, predicate: F) -> Filtered<Self, F>
fn filtered<F>(self, predicate: F) -> Filtered<Self, F>
Self::filtered_by
with a QlogFilter that advances its generation.§fn filtered_by<F>(self, predicate: F) -> Filtered<Self, F>where
F: QlogFilter,
Self: Sized,
fn filtered_by<F>(self, predicate: F) -> Filtered<Self, F>where
F: QlogFilter,
Self: Sized,
Auto Trait Implementations§
impl !RefUnwindSafe for QlogRecorder
impl !UnwindSafe for QlogRecorder
impl Forget for QlogRecorder
impl Freeze for QlogRecorderwhere
*const ArcInner<Chan<Command, Semaphore>> is !null: Freeze,
PhantomData<ArcInner<Chan<Command, Semaphore>>>: Freeze,
*const ArcInner<Shared> is !null: Freeze,
PhantomData<ArcInner<Shared>>: Freeze,
impl Move for QlogRecorder
impl Send for QlogRecorder
impl Sync for QlogRecorder
impl Unpin for QlogRecorder
impl UnsafeUnpin for QlogRecorderwhere
*const ArcInner<Chan<Command, Semaphore>> is !null: UnsafeUnpin,
PhantomData<ArcInner<Chan<Command, Semaphore>>>: UnsafeUnpin,
*const ArcInner<Shared> is !null: UnsafeUnpin,
PhantomData<ArcInner<Shared>>: UnsafeUnpin,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a rama_grpc::Request§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy that returns Action::Follow only if self and other return
Action::Follow. Read more