diff --git a/foundations/Cargo.toml b/foundations/Cargo.toml index 3136b275..aeabf29b 100644 --- a/foundations/Cargo.toml +++ b/foundations/Cargo.toml @@ -253,7 +253,7 @@ once_cell = { workspace = true, optional = true } opentelemetry-proto = { workspace = true, optional = true, features = ["gen-tonic-messages", "trace"] } parking_lot = { workspace = true, optional = true } percent-encoding = { workspace = true, optional = true } -prometheus = { workspace = true, optional = true, features = ["process"] } +prometheus = { workspace = true, optional = true, features = ["process", "protobuf"] } prometheus-client = { workspace = true, optional = true } prometools = { workspace = true, optional = true, features = ["serde"] } prost = { workspace = true, optional = true } diff --git a/foundations/src/telemetry/metrics/process.rs b/foundations/src/telemetry/metrics/process.rs index 1171eca2..5d0efcff 100644 --- a/foundations/src/telemetry/metrics/process.rs +++ b/foundations/src/telemetry/metrics/process.rs @@ -59,7 +59,7 @@ fn convert_family(family: PrometheusMetricFamily) -> Option { MetricType::Counter => Metric { label, counter: Some(Counter { - value: Some(metric.get_counter().get_value()), + value: Some(metric.get_counter().value()), ..Default::default() }), ..Default::default() @@ -67,7 +67,7 @@ fn convert_family(family: PrometheusMetricFamily) -> Option { MetricType::Gauge => Metric { label, gauge: Some(Gauge { - value: Some(metric.get_gauge().get_value()), + value: Some(metric.get_gauge().value()), }), ..Default::default() },