pub struct ReportState {
pub collection_runs_total: u64,
pub collection_errors_total: u64,
pub collector_failures_total: BTreeMap<String, u64>,
pub last_collection_timestamp: Option<u64>,
pub last_run_healthy: bool,
}Expand description
Counters kept across collection runs. Not part of MonitordStats so the
JSON output is unchanged; only the report server reads them.
Fields§
§collection_runs_total: u64§collection_errors_total: u64§collector_failures_total: BTreeMap<String, u64>Failure count per collector name. Every collector seen gets an entry, so a counter is present at 0 before its first failure.
last_collection_timestamp: Option<u64>None until the first run finishes.
last_run_healthy: boolImplementations§
Source§impl ReportState
impl ReportState
Sourcepub fn record_run(&mut self, timings: &[CollectorTiming], had_error: bool)
pub fn record_run(&mut self, timings: &[CollectorTiming], had_error: bool)
Record a finished collection run.
Trait Implementations§
Source§impl Clone for ReportState
impl Clone for ReportState
Source§fn clone(&self) -> ReportState
fn clone(&self) -> ReportState
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ReportState
impl Debug for ReportState
Source§impl Default for ReportState
impl Default for ReportState
Source§fn default() -> ReportState
fn default() -> ReportState
Returns the “default value” for a type. Read more
Source§impl PartialEq for ReportState
impl PartialEq for ReportState
Source§fn eq(&self, other: &ReportState) -> bool
fn eq(&self, other: &ReportState) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ReportState
Auto Trait Implementations§
impl Freeze for ReportState
impl RefUnwindSafe for ReportState
impl Send for ReportState
impl Sync for ReportState
impl Unpin for ReportState
impl UnsafeUnpin for ReportState
impl UnwindSafe for ReportState
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.