File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
opentelemetry-stdout/src/metrics Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -234,6 +234,20 @@ fn print_hist_data_points<T: Debug>(data_points: &[HistogramDataPoint<T>]) {
234234 for kv in data_point. attributes . iter ( ) {
235235 println ! ( "\t \t \t \t -> {}: {}" , kv. key, kv. value. as_str( ) ) ;
236236 }
237+
238+ println ! ( "\t \t \t Buckets" ) ;
239+ let mut lower_bound = f64:: NEG_INFINITY ;
240+ for ( i, & upper_bound) in data_point. bounds . iter ( ) . enumerate ( ) {
241+ let count = data_point. bucket_counts . get ( i) . unwrap_or ( & 0 ) ;
242+ println ! ( "\t \t \t \t {} to {} : {}" , lower_bound, upper_bound, count) ;
243+ lower_bound = upper_bound;
244+ }
245+
246+ let last_count = data_point
247+ . bucket_counts
248+ . get ( data_point. bounds . len ( ) )
249+ . unwrap_or ( & 0 ) ;
250+ println ! ( "\t \t \t \t {} to +Infinity : {}" , lower_bound, last_count) ;
237251 }
238252}
239253
You can’t perform that action at this time.
0 commit comments