made_core/value_objects/metric_kind.rs
1/// Prometheus metric family kind.
2#[derive(Clone, Copy, Debug, PartialEq, Eq)]
3pub enum MetricKind {
4 Counter,
5 Gauge,
6 Histogram,
7 Summary,
8 Untyped,
9}
10
11impl MetricKind {
12 #[must_use]
13 pub const fn as_str(self) -> &'static str {
14 match self {
15 Self::Counter => "counter",
16 Self::Gauge => "gauge",
17 Self::Histogram => "histogram",
18 Self::Summary => "summary",
19 Self::Untyped => "untyped",
20 }
21 }
22}