pub struct StandardObserverBuilder { /* private fields */ }Expand description
Builder for StandardObserver.
Implementations§
Source§impl StandardObserverBuilder
impl StandardObserverBuilder
Sourcepub fn service(
self,
name: impl Into<String>,
version: impl Into<String>,
) -> Self
pub fn service( self, name: impl Into<String>, version: impl Into<String>, ) -> Self
Set service identity.
Sourcepub fn sink_for(self, tier: Tier, sink: Arc<dyn Sink>) -> Self
pub fn sink_for(self, tier: Tier, sink: Arc<dyn Sink>) -> Self
Wire a sink for a specific tier. Calling twice replaces the prior sink.
Sourcepub fn sink_fallback(self, sink: Arc<dyn Sink>) -> Self
pub fn sink_fallback(self, sink: Arc<dyn Sink>) -> Self
Wire a fallback sink.
Sourcepub fn config(self, cfg: EventsConfig) -> Self
pub fn config(self, cfg: EventsConfig) -> Self
Set an explicit config.
Sourcepub fn filter(self, spec: impl Into<String>) -> Self
pub fn filter(self, spec: impl Into<String>) -> Self
Set the filter spec (overrides anything in config.filter).
Sourcepub fn registry(self, registry: Arc<SchemaRegistry>) -> Self
pub fn registry(self, registry: Arc<SchemaRegistry>) -> Self
Use a specific schema registry.
Sourcepub fn spawn_workers(self, yes: bool) -> Self
pub fn spawn_workers(self, yes: bool) -> Self
Spawn per-tier mpsc workers when a tokio runtime is available
(default true). Disable for synchronous tests that want
in-emit-thread delivery.
Sourcepub fn build(self) -> Result<StandardObserver, BuildError>
pub fn build(self) -> Result<StandardObserver, BuildError>
Trait Implementations§
Source§impl Debug for StandardObserverBuilder
impl Debug for StandardObserverBuilder
Auto Trait Implementations§
impl Freeze for StandardObserverBuilder
impl !RefUnwindSafe for StandardObserverBuilder
impl Send for StandardObserverBuilder
impl Sync for StandardObserverBuilder
impl Unpin for StandardObserverBuilder
impl UnsafeUnpin for StandardObserverBuilder
impl !UnwindSafe for StandardObserverBuilder
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