Skip to content

Commit 49cd80b

Browse files
committed
metrics: migrate away from methods deprecated by prometheus 0.14
1 parent 8408057 commit 49cd80b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/metrics/log_encoder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ fn families_to_json_events(families: &[MetricFamily]) -> Vec<VectorEvent<'_>> {
9797
let mut counts = Vec::new();
9898
let mut last_cumulative_count = 0;
9999
for bucket in histogram.get_bucket() {
100-
buckets.push(bucket.get_upper_bound());
101-
counts.push(bucket.get_cumulative_count() - last_cumulative_count);
102-
last_cumulative_count = bucket.get_cumulative_count();
100+
buckets.push(bucket.upper_bound());
101+
counts.push(bucket.cumulative_count() - last_cumulative_count);
102+
last_cumulative_count = bucket.cumulative_count();
103103
}
104104

105105
VectorMetricData::AggregatedHistogram {
@@ -117,11 +117,11 @@ fn families_to_json_events(families: &[MetricFamily]) -> Vec<VectorEvent<'_>> {
117117
metric: VectorMetric {
118118
data,
119119
kind: "absolute",
120-
name: family.get_name(),
120+
name: family.name(),
121121
tags: metric
122122
.get_label()
123123
.iter()
124-
.map(|p| (p.get_name(), p.get_value()))
124+
.map(|p| (p.name(), p.value()))
125125
.collect(),
126126
},
127127
});

0 commit comments

Comments
 (0)