pub struct Metrics {
pub authoritative_hits: u64,
pub override_hits: u64,
pub blocked: u64,
pub cache_misses: u64,
pub cache_hits: u64,
pub nameserver_hits: u64,
pub nameserver_misses: u64,
}
Expand description
Metrics from a resolution attempt. The resolvers build this structure rather than update the Prometheus metrics directly.
Fields§
Hits on authoritative data: zone authoritative answers, CNAMEs, delegations, and name errors. Does not include blocked domains.
override_hits: u64
Hits on non-authoritative data: zone non-authoritative answers and CNAMEs (zone non-authoritative delegations and name errors are ignored). Does not include blocked domains.
blocked: u64
A or AAAA questions (ie, not *) where the result is from a zone and has the unspecified IP.
cache_misses: u64
Cache misses
cache_hits: u64
Cache hits
nameserver_hits: u64
Questions which are answered by some upstream nameserver.
nameserver_misses: u64
Questions which an upstream nameserver fails to answer.
Implementations§
Source§impl Metrics
impl Metrics
pub fn new() -> Self
pub fn zoneresult_answer( &mut self, rrs: &[ResourceRecord], zone: &Zone, question: &Question, )
pub fn zoneresult_cname(&mut self, zone: &Zone)
pub fn zoneresult_delegation(&mut self, zone: &Zone)
pub fn zoneresult_nameerror(&mut self, zone: &Zone)
pub fn cache_hit(&mut self)
pub fn cache_miss(&mut self)
pub fn nameserver_hit(&mut self)
pub fn nameserver_miss(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Metrics
impl RefUnwindSafe for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnwindSafe for Metrics
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