pub trait MetricCollector: Send + Sync {
// Required methods
fn collect(&self) -> DeviceResult<Vec<Metric>>;
fn name(&self) -> &str;
fn interval(&self) -> Duration;
fn is_enabled(&self) -> bool;
}Expand description
Metric collector trait
Required Methods§
Sourcefn collect(&self) -> DeviceResult<Vec<Metric>>
fn collect(&self) -> DeviceResult<Vec<Metric>>
Collect metrics
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Check if collector is enabled