pub struct MetricFamilyMeta {
pub name: String,
pub ty: MetricType,
pub unit: Option<String>,
pub help: Option<String>,
}Expand description
One metric family’s OpenMetrics metadata. Identifies the family by name and surfaces its type / unit / help.
The OpenMetrics envelope:
# TYPE process_cpu_seconds_total counter
# UNIT process_cpu_seconds_total seconds
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.becomes:
ⓘ
MetricFamilyMeta {
name: "process_cpu_seconds_total".into(),
ty: MetricType::Counter,
unit: Some("seconds".into()),
help: Some("Total user and system CPU time spent in seconds.".into()),
}Fields§
§name: StringFamily name (e.g. http_requests_total,
nmbrs_phase_duration_seconds). For histograms /
summaries this is the family name; the time-series
names emitted on the wire (<name>_bucket,
<name>_sum, <name>_count) are derived siblings, not
distinct families.
ty: MetricTypeMetric type per OpenMetrics 1.0.
unit: Option<String>Optional unit (seconds, bytes, etc.). Used by
completion to surface a hint on the metric name, and
by the metricsql evaluator to validate
type-incompatible binary ops.
help: Option<String>Optional help string, lifted verbatim from the
OpenMetrics # HELP metadata.
Trait Implementations§
Source§impl Clone for MetricFamilyMeta
impl Clone for MetricFamilyMeta
Source§impl Debug for MetricFamilyMeta
impl Debug for MetricFamilyMeta
impl Eq for MetricFamilyMeta
Source§impl PartialEq for MetricFamilyMeta
impl PartialEq for MetricFamilyMeta
impl StructuralPartialEq for MetricFamilyMeta
Auto Trait Implementations§
impl Freeze for MetricFamilyMeta
impl RefUnwindSafe for MetricFamilyMeta
impl Send for MetricFamilyMeta
impl Sync for MetricFamilyMeta
impl Unpin for MetricFamilyMeta
impl UnsafeUnpin for MetricFamilyMeta
impl UnwindSafe for MetricFamilyMeta
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.