Skip to main content

metrics

Function metrics 

Source
pub fn metrics(ctx: &ServiceContext) -> Result<Table, Error>
Expand description

Every metric the sink currently holds: owner, metric, value, age_s.

age_s is seconds since that sample was published, not since it was read. Without it a number frozen at the moment of a crash is indistinguishable from one being maintained right now, and an instrument that cannot tell those apart is worse than none.

ยงErrors

Whatever crate::call::request_within returns: Error::Unreachable if the sink could not be reached, Error::Busy if its queue was full, Error::OutcomeUnknown if it did not answer in time, Error::PeerDied if it died holding the question. Then Error::Failed - not Error::Malformed, which is what the rest of this library uses - if it answered with something this cannot parse. All of these are reads, so any of them may be asked again.