Skip to content

Commit fd74d2c

Browse files
authored
fix: use configured unit suffix for histogram sum/count lines as well
1 parent 1e68f09 commit fd74d2c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

metrics-exporter-prometheus/src/recorder.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ impl Inner {
202202
&name,
203203
Some("bucket"),
204204
&labels,
205-
Some(("le", "+Inf")),
205+
Some(("le", "+Inf")),i
206206
histogram.count(),
207207
unit.filter(|_| self.enable_unit_suffix),
208208
);
@@ -218,7 +218,7 @@ impl Inner {
218218
&labels,
219219
None,
220220
sum,
221-
unit,
221+
unit.filter(|_| self.enable_unit_suffix),
222222
);
223223
write_metric_line::<&str, u64>(
224224
&mut output,
@@ -227,7 +227,7 @@ impl Inner {
227227
&labels,
228228
None,
229229
count,
230-
unit,
230+
unit.filter(|_| self.enable_unit_suffix),
231231
);
232232
}
233233

0 commit comments

Comments
 (0)