File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
opentelemetry-proto/src/transform
opentelemetry-sdk/src/metrics/data Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -258,8 +258,8 @@ pub mod tonic {
258258 } ) ,
259259 flags : TonicDataPointFlags :: default ( ) as u32 ,
260260 exemplars : dp. exemplars ( ) . map ( Into :: into) . collect ( ) ,
261- min : dp. min . map ( Numeric :: into_f64) ,
262- max : dp. max . map ( Numeric :: into_f64) ,
261+ min : dp. min ( ) . map ( Numeric :: into_f64) ,
262+ max : dp. max ( ) . map ( Numeric :: into_f64) ,
263263 zero_threshold : dp. zero_threshold ( ) ,
264264 } )
265265 . collect ( ) ,
Original file line number Diff line number Diff line change @@ -448,9 +448,9 @@ pub struct ExponentialHistogramDataPoint<T> {
448448 /// The number of updates this histogram has been calculated with.
449449 pub ( crate ) count : usize ,
450450 /// The minimum value recorded.
451- pub min : Option < T > ,
451+ pub ( crate ) min : Option < T > ,
452452 /// The maximum value recorded.
453- pub max : Option < T > ,
453+ pub ( crate ) max : Option < T > ,
454454 /// The sum of the values recorded.
455455 pub ( crate ) sum : T ,
456456
@@ -531,6 +531,18 @@ impl<T> ExponentialHistogramDataPoint<T> {
531531 }
532532}
533533
534+ impl < T : Copy > ExponentialHistogramDataPoint < T > {
535+ /// Returns the minimum value recorded.
536+ pub fn min ( & self ) -> Option < T > {
537+ self . min
538+ }
539+
540+ /// Returns the maximum value recorded.
541+ pub fn max ( & self ) -> Option < T > {
542+ self . max
543+ }
544+ }
545+
534546/// A set of bucket counts, encoded in a contiguous array of counts.
535547#[ derive( Debug , Clone , PartialEq ) ]
536548pub struct ExponentialBucket {
You can’t perform that action at this time.
0 commit comments