pub struct NoopTelemetry;Expand description
Telemetry implementation that discards all metrics and events.
This is useful in tests and extremely constrained environments where telemetry is not required.
Trait Implementations§
Source§impl Clone for NoopTelemetry
impl Clone for NoopTelemetry
Source§fn clone(&self) -> NoopTelemetry
fn clone(&self) -> NoopTelemetry
Returns a duplicate of the value. Read more
1.0.0 · 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 NoopTelemetry
impl Debug for NoopTelemetry
Source§impl Default for NoopTelemetry
impl Default for NoopTelemetry
Source§fn default() -> NoopTelemetry
fn default() -> NoopTelemetry
Returns the “default value” for a type. Read more
Source§impl Telemetry for NoopTelemetry
impl Telemetry for NoopTelemetry
Source§const METRICS_ENABLED: bool = false
const METRICS_ENABLED: bool = false
Compile-time flag indicating whether this telemetry implementation
wants metrics (counters, gauges, latencies) at all. Read more
Source§const EVENTS_STATICALLY_ENABLED: bool = false
const EVENTS_STATICALLY_ENABLED: bool = false
Compile-time flag indicating whether this telemetry implementation
ever produces structured events. Read more
Source§fn incr_counter(&mut self, _key: TelemetryKey, _delta: u64)
fn incr_counter(&mut self, _key: TelemetryKey, _delta: u64)
Increment a counter metric identified by the given key. Read more
Source§fn set_gauge(&mut self, _key: TelemetryKey, _value: u64)
fn set_gauge(&mut self, _key: TelemetryKey, _value: u64)
Set a gauge metric identified by the given key. Read more
Source§fn record_latency_ns(&mut self, _key: TelemetryKey, _value_ns: u64)
fn record_latency_ns(&mut self, _key: TelemetryKey, _value_ns: u64)
Record a latency sample in nanoseconds for the given key. Read more
Source§fn push_metrics(&mut self)
fn push_metrics(&mut self)
Optional: push a snapshot of aggregated metrics to the sink. Read more
Source§fn events_enabled(&self) -> bool
fn events_enabled(&self) -> bool
Return true if this telemetry collector wants structured events. Read more
Source§fn push_event(&mut self, _event: TelemetryEvent)
fn push_event(&mut self, _event: TelemetryEvent)
Emit a structured telemetry event. Read more
impl Copy for NoopTelemetry
Auto Trait Implementations§
impl Freeze for NoopTelemetry
impl RefUnwindSafe for NoopTelemetry
impl Send for NoopTelemetry
impl Sync for NoopTelemetry
impl Unpin for NoopTelemetry
impl UnsafeUnpin for NoopTelemetry
impl UnwindSafe for NoopTelemetry
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