pub enum MetricsError {
CircuitOpen,
Overloaded,
InvalidName,
InvalidValue {
reason: &'static str,
},
Overflow,
Underflow,
OverLimit,
WouldBlock,
NotInitialized,
CardinalityExceeded,
Config(String),
}Expand description
Metrics errors
Variants§
CircuitOpen
Circuit breaker is open and the operation is not allowed.
Overloaded
System is overloaded (e.g., adaptive sampler reduced acceptance) and rejected the operation.
InvalidName
Invalid metric name (empty, overly long, or otherwise rejected by a policy).
InvalidValue
Invalid value supplied (NaN, non-finite, out-of-range, or otherwise invalid).
Fields
Overflow
Arithmetic would overflow the counter or index (checked variants only).
Underflow
Arithmetic would underflow (checked variants only).
OverLimit
Operation would exceed a configured limit (rate limiting, quotas, etc.).
WouldBlock
Operation would block and a non-blocking/try path was requested.
NotInitialized
Global metrics were not initialized and the operation requires initialization.
CardinalityExceeded
Registering this (name, labels) combination would exceed the
configured cardinality cap. The try_*_with lookup variants return
this error; the non-try variants route to a per-type sink instead
(see Registry::set_cardinality_cap).
Config(String)
Configuration error with details.
Trait Implementations§
Source§impl Clone for MetricsError
impl Clone for MetricsError
Source§fn clone(&self) -> MetricsError
fn clone(&self) -> MetricsError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetricsError
impl Debug for MetricsError
Source§impl Display for MetricsError
impl Display for MetricsError
Source§impl Error for MetricsError
impl Error for MetricsError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for MetricsError
impl PartialEq for MetricsError
Source§fn eq(&self, other: &MetricsError) -> bool
fn eq(&self, other: &MetricsError) -> bool
self and other values to be equal, and is used by ==.