noop
Zero-cost no-op implementations for observability when features are disabled
Structs
Section titled “Structs”NoOpObservabilityPlugin
Section titled “NoOpObservabilityPlugin”No-op observability plugin that does nothing
This implementation provides zero runtime cost when observability is disabled. All methods are inlined and compile to nothing in release builds.
Methods
fn new() -> SelfCreate a new no-op plugin
shared
Section titled “shared”fn shared() -> Arc<Self>Create an Arc’d no-op plugin for sharing
NoOpMetricsCollector
Section titled “NoOpMetricsCollector”No-op metrics collector
Methods
fn new() -> SelfNoOpStructuredLogger
Section titled “NoOpStructuredLogger”No-op structured logger
Methods
fn new() -> Selfwith_level
Section titled “with_level”fn with_level(level: LogLevel) -> SelfFunctions
Section titled “Functions”create_noop_plugin
Section titled “create_noop_plugin”fn create_noop_plugin() -> Box<dyn ObservabilityPlugin>Convenience function to create a no-op plugin when observability is disabled
create_shared_noop_plugin
Section titled “create_shared_noop_plugin”fn create_shared_noop_plugin() -> Arc<dyn ObservabilityPlugin>Convenience function to create a shared no-op plugin