pub struct InMemorySink { /* private fields */ }Expand description
A reference / test sink that retains up to MAX_RETAINED_SPANS spans in memory.
Implementations§
Trait Implementations§
Source§impl Debug for InMemorySink
impl Debug for InMemorySink
Source§impl Default for InMemorySink
impl Default for InMemorySink
Source§fn default() -> InMemorySink
fn default() -> InMemorySink
Returns the “default value” for a type. Read more
Source§impl TelemetrySink for InMemorySink
impl TelemetrySink for InMemorySink
fn export(&self, span: &FilterSpan)
Source§fn enabled(&self) -> bool
fn enabled(&self) -> bool
Whether this sink consumes spans at all. When
false, the host skips span construction
entirely on the per-request path — build_filter_span allocates (name, attributes, one
event per host-log line), which would otherwise be paid per hook call just to be dropped
by export. Defaults to true; only a sink that discards everything should override.Auto Trait Implementations§
impl !Freeze for InMemorySink
impl !RefUnwindSafe for InMemorySink
impl Send for InMemorySink
impl Sync for InMemorySink
impl Unpin for InMemorySink
impl UnsafeUnpin for InMemorySink
impl UnwindSafe for InMemorySink
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> 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>
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 more