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>,
) -> StandardObserverBuilder
pub fn service( self, name: impl Into<String>, version: impl Into<String>, ) -> StandardObserverBuilder
Set service identity.
Sourcepub fn instance(self, instance: impl Into<String>) -> StandardObserverBuilder
pub fn instance(self, instance: impl Into<String>) -> StandardObserverBuilder
Set instance id.
Sourcepub fn sink_for(
self,
tier: Tier,
sink: Arc<dyn Sink>,
) -> StandardObserverBuilder
pub fn sink_for( self, tier: Tier, sink: Arc<dyn Sink>, ) -> StandardObserverBuilder
Wire a sink for a specific tier. Calling twice replaces the prior sink.
Sourcepub fn sink_fallback(self, sink: Arc<dyn Sink>) -> StandardObserverBuilder
pub fn sink_fallback(self, sink: Arc<dyn Sink>) -> StandardObserverBuilder
Wire a fallback sink.
Sourcepub fn config(self, cfg: EventsConfig) -> StandardObserverBuilder
pub fn config(self, cfg: EventsConfig) -> StandardObserverBuilder
Set an explicit config.
Sourcepub fn filter(self, spec: impl Into<String>) -> StandardObserverBuilder
pub fn filter(self, spec: impl Into<String>) -> StandardObserverBuilder
Set the filter spec (overrides anything in config.filter).
Sourcepub fn registry(self, registry: Arc<SchemaRegistry>) -> StandardObserverBuilder
pub fn registry(self, registry: Arc<SchemaRegistry>) -> StandardObserverBuilder
Use a specific schema registry.
Sourcepub fn spawn_workers(self, yes: bool) -> StandardObserverBuilder
pub fn spawn_workers(self, yes: bool) -> StandardObserverBuilder
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
Source§impl Default for StandardObserverBuilder
impl Default for StandardObserverBuilder
Source§fn default() -> StandardObserverBuilder
fn default() -> StandardObserverBuilder
Returns the “default value” for a type. Read more
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request