Skip to content

Commit f304bff

Browse files
stdout: reverse output of negative bucket
1 parent 8628839 commit f304bff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

opentelemetry-stdout/src/metrics/exporter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ fn print_exponential_hist_data_points<'a, T: Debug + Copy + 'a>(
317317
let negative_bucket = data_point.negative_bucket();
318318
let negative_offset = negative_bucket.offset();
319319
println!("\t\t\tNegativeOffset : {}", negative_offset);
320-
for (i, count) in negative_bucket.counts().enumerate() {
320+
for (i, count) in negative_bucket.counts().collect::<Vec<_>>().into_iter().enumerate().rev() {
321321
let from = -base.powf(i as f64 + negative_offset as f64);
322322
let to = -base.powf(i as f64 + negative_offset as f64 + 1.0f64);
323323
println!(
324-
"\t\t\t\t -> Bucket {} (> {:.3} to <= {:.3}) : {}",
324+
"\t\t\t\t -> Bucket {} (<= {:.3} to > {:.3}) : {}",
325325
i, from, to, count
326326
);
327327
}

0 commit comments

Comments
 (0)