#[non_exhaustive]pub struct Metrics {
pub lookups: Counter,
pub lookups_failed: Counter,
pub service_results: Family<ServiceLabels, Counter>,
pub service_errors: Family<ServiceLabels, Counter>,
}Expand description
Metrics collected by address lookup.
A lookup is one call to AddressLookupServices::resolve and queries all
configured services at once. Each service can yield several results and
errors per lookup; those are counted in the service_* counters, labeled
by the service’s provenance (e.g. dns, pkarr).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.lookups: CounterLookups started.
lookups_failed: CounterLookups that ended without a single result.
Includes lookups with no services configured. Lookups abandoned early (e.g. once a connection is established) are not counted.
service_results: Family<ServiceLabels, Counter>Results yielded per service.
service_errors: Family<ServiceLabels, Counter>Errors yielded per service.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Metrics
impl<'de> Deserialize<'de> for Metrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Iterable for Metrics
impl Iterable for Metrics
Source§fn metric_field_count(&self) -> usize
fn metric_field_count(&self) -> usize
Returns the number of metric fields in the struct.
Source§fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
fn metric_field_ref(&self, n: usize) -> Option<MetricItem<'_>>
Returns the metric field at the given index.
Source§fn family_field_count(&self) -> usize
fn family_field_count(&self) -> usize
Returns the number of
Family fields in the struct.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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§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>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoIterable for Twhere
T: Iterable,
impl<T> IntoIterable for Twhere
T: Iterable,
§fn as_iterable(&self) -> &dyn Iterable
fn as_iterable(&self) -> &dyn Iterable
Returns
self as dyn Iterable§fn field_iter(&self) -> FieldIter<'_>
fn field_iter(&self) -> FieldIter<'_>
Returns an iterator over the metric fields of the struct.
§fn family_iter(&self) -> FamilyIter<'_>
fn family_iter(&self) -> FamilyIter<'_>
Returns an iterator over the Family fields of the struct.