pub struct NoopObserver;Expand description
The default observer: drops every envelope.
Trait Implementations§
Source§impl Clone for NoopObserver
impl Clone for NoopObserver
Source§fn clone(&self) -> NoopObserver
fn clone(&self) -> NoopObserver
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 Debug for NoopObserver
impl Debug for NoopObserver
Source§impl Default for NoopObserver
impl Default for NoopObserver
Source§fn default() -> NoopObserver
fn default() -> NoopObserver
Returns the “default value” for a type. Read more
Source§impl Observer for NoopObserver
impl Observer for NoopObserver
Source§fn emit_envelope(&self, _env: ObsEnvelope)
fn emit_envelope(&self, _env: ObsEnvelope)
Hot-path emit. Never blocks. Never panics. Spec 11 § 3.
Source§fn enabled(&self, _callsite: &ObsCallsite) -> bool
fn enabled(&self, _callsite: &ObsCallsite) -> bool
Cheap callsite filter check; called only when the cached
Interest is Sometimes. Default impl returns true
(allows every callsite that survived enabled_static).Source§fn generation(&self) -> u32
fn generation(&self) -> u32
Monotonic generation counter; bumped on every filter / config
change so callsite caches re-validate. Spec 11 § 3.2.
Source§fn reload_filter(&self)
fn reload_filter(&self)
Force every callsite’s
interest cache back to Unknown.
Default impl is a no-op for observers that don’t filter.Source§fn shutdown_blocking(&self, timeout: Duration)
fn shutdown_blocking(&self, timeout: Duration)
Synchronous shutdown for use in panic hooks and
Drop impls
where awaiting is not possible. Best-effort within timeout.
Spec 11 § 3, § 6.1.Source§fn callsites(&self) -> Option<Arc<ObsCallsiteRegistry>>
fn callsites(&self) -> Option<Arc<ObsCallsiteRegistry>>
Access this observer’s per-process callsite registry, when it
has one. The bridge (Direction A) writes the registry on first
sight;
ObsToTracingSink reads it to reconstitute
tracing::Metadata for interned envelopes. Spec 31 § 3.2.Source§fn schema_registry(&self) -> Option<Arc<SchemaRegistry>>
fn schema_registry(&self) -> Option<Arc<SchemaRegistry>>
Access this observer’s schema registry, when it has one. Sinks
hold their own
Arc<SchemaRegistry> from construction; this
hook lets the bridge fall back to the global observer’s
registry without depending on StandardObserver.Source§fn resource_attrs(&self) -> Arc<ResourceAttrs> ⓘ
fn resource_attrs(&self) -> Arc<ResourceAttrs> ⓘ
Snapshot of the workspace-shared
ResourceAttrs (OTel
semantic-convention keys). Sinks call this at flush time so a
single config-watcher reload re-projects every sink. Default
returns the empty / observer-less attribute set; concrete
observers (StandardObserver) override. Spec 20 § 2.1 / spec
94 § 2.7 / P1-E.impl Copy for NoopObserver
Auto Trait Implementations§
impl Freeze for NoopObserver
impl RefUnwindSafe for NoopObserver
impl Send for NoopObserver
impl Sync for NoopObserver
impl Unpin for NoopObserver
impl UnsafeUnpin for NoopObserver
impl UnwindSafe for NoopObserver
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