Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions opentelemetry-stdout/src/metrics/exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,20 @@
for kv in data_point.attributes.iter() {
println!("\t\t\t\t -> {}: {}", kv.key, kv.value.as_str());
}

println!("\t\t\tBuckets");
let mut lower_bound = f64::NEG_INFINITY;
for (i, &upper_bound) in data_point.bounds.iter().enumerate() {
let count = data_point.bucket_counts.get(i).unwrap_or(&0);
println!("\t\t\t\t {} to {} : {}", lower_bound, upper_bound, count);
lower_bound = upper_bound;
}

Check warning on line 244 in opentelemetry-stdout/src/metrics/exporter.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-stdout/src/metrics/exporter.rs#L238-L244

Added lines #L238 - L244 were not covered by tests

let last_count = data_point
.bucket_counts
.get(data_point.bounds.len())
.unwrap_or(&0);
println!("\t\t\t\t{} to +Infinity : {}", lower_bound, last_count);

Check warning on line 250 in opentelemetry-stdout/src/metrics/exporter.rs

View check run for this annotation

Codecov / codecov/patch

opentelemetry-stdout/src/metrics/exporter.rs#L246-L250

Added lines #L246 - L250 were not covered by tests
}
}

Expand Down