@@ -191,7 +191,6 @@ pub struct Metric {
191191 /// name of the metric.
192192 pub name : Option < String > ,
193193 /// description of the metric, which can be used in documentation.
194-
195194 pub description : Option < String > ,
196195 /// unit in which the metric value is reported. Follows the format
197196 /// described by <http://unitsofmeasure.org/ucum.html.>
@@ -235,10 +234,8 @@ pub struct Sum {
235234 pub data_points : Option < Vec < NumberDataPoint > > ,
236235 /// aggregation_temporality describes if the aggregator reports delta changes
237236 /// since last report time, or cumulative changes since a fixed start time.
238-
239237 pub aggregation_temporality : Option < i32 > ,
240238 /// If "true" means that the sum is monotonic.
241-
242239 pub is_monotonic : Option < bool > ,
243240}
244241/// Histogram represents the type of a metric that is calculated by aggregating
@@ -250,7 +247,6 @@ pub struct Histogram {
250247 pub data_points : Option < Vec < HistogramDataPoint > > ,
251248 /// aggregation_temporality describes if the aggregator reports delta changes
252249 /// since last report time, or cumulative changes since a fixed start time.
253-
254250 pub aggregation_temporality : Option < i32 > ,
255251}
256252/// ExponentialHistogram represents the type of a metric that is calculated by aggregating
@@ -261,7 +257,6 @@ pub struct ExponentialHistogram {
261257 pub data_points : Option < Vec < ExponentialHistogramDataPoint > > ,
262258 /// aggregation_temporality describes if the aggregator reports delta changes
263259 /// since last report time, or cumulative changes since a fixed start time.
264-
265260 pub aggregation_temporality : Option < i32 > ,
266261}
267262/// Summary metric data are used to convey quantile summaries,
@@ -560,7 +555,7 @@ pub mod summary_data_point {
560555 fn deserialize_f64_or_nan < ' de , D > ( deserializer : D ) -> Result < Option < f64 > , D :: Error > where D : Deserializer < ' de > ,
561556 {
562557 struct StringOrFloatVisitor ;
563- impl < ' de > serde:: de:: Visitor < ' de > for StringOrFloatVisitor
558+ impl serde:: de:: Visitor < ' _ > for StringOrFloatVisitor
564559 {
565560 type Value = Option < f64 > ;
566561 fn expecting ( & self , formatter : & mut std:: fmt:: Formatter ) -> std:: fmt:: Result
@@ -617,68 +612,8 @@ pub struct Exemplar {
617612/// which they are aggregated.
618613#[ repr( i32 ) ]
619614pub enum AggregationTemporality {
620- /// UNSPECIFIED is the default AggregationTemporality, it MUST not be used.
621615 Unspecified = 0 ,
622- /// DELTA is an AggregationTemporality for a metric aggregator which reports
623- /// changes since last report time. Successive metrics contain aggregation of
624- /// values from continuous and non-overlapping intervals.
625- ///
626- /// The values for a DELTA metric are based only on the time interval
627- /// associated with one measurement cycle. There is no dependency on
628- /// previous measurements like is the case for CUMULATIVE metrics.
629- ///
630- /// For example, consider a system measuring the number of requests that
631- /// it receives and reports the sum of these requests every second as a
632- /// DELTA metric:
633- ///
634- /// 1. The system starts receiving at time=t_0.
635- /// 2. A request is received, the system measures 1 request.
636- /// 3. A request is received, the system measures 1 request.
637- /// 4. A request is received, the system measures 1 request.
638- /// 5. The 1 second collection cycle ends. A metric is exported for the
639- /// number of requests received over the interval of time t_0 to
640- /// t_0+1 with a value of 3.
641- /// 6. A request is received, the system measures 1 request.
642- /// 7. A request is received, the system measures 1 request.
643- /// 8. The 1 second collection cycle ends. A metric is exported for the
644- /// number of requests received over the interval of time t_0+1 to
645- /// t_0+2 with a value of 2.
646616 Delta = 1 ,
647- /// CUMULATIVE is an AggregationTemporality for a metric aggregator which
648- /// reports changes since a fixed start time. This means that current values
649- /// of a CUMULATIVE metric depend on all previous measurements since the
650- /// start time. Because of this, the sender is required to retain this state
651- /// in some form. If this state is lost or invalidated, the CUMULATIVE metric
652- /// values MUST be reset and a new fixed start time following the last
653- /// reported measurement time sent MUST be used.
654- ///
655- /// For example, consider a system measuring the number of requests that
656- /// it receives and reports the sum of these requests every second as a
657- /// CUMULATIVE metric:
658- ///
659- /// 1. The system starts receiving at time=t_0.
660- /// 2. A request is received, the system measures 1 request.
661- /// 3. A request is received, the system measures 1 request.
662- /// 4. A request is received, the system measures 1 request.
663- /// 5. The 1 second collection cycle ends. A metric is exported for the
664- /// number of requests received over the interval of time t_0 to
665- /// t_0+1 with a value of 3.
666- /// 6. A request is received, the system measures 1 request.
667- /// 7. A request is received, the system measures 1 request.
668- /// 8. The 1 second collection cycle ends. A metric is exported for the
669- /// number of requests received over the interval of time t_0 to
670- /// t_0+2 with a value of 5.
671- /// 9. The system experiences a fault and loses state.
672- /// 10. The system recovers and resumes receiving at time=t_1.
673- /// 11. A request is received, the system measures 1 request.
674- /// 12. The 1 second collection cycle ends. A metric is exported for the
675- /// number of requests received over the interval of time t_1 to
676- /// t_0+1 with a value of 1.
677- ///
678- /// Note: Even though, when reporting changes since last report time, using
679- /// CUMULATIVE is valid, it is not recommended. This may cause problems for
680- /// systems that do not use start_time to determine when the aggregation
681- /// value was reset (e.g. Prometheus).
682617 Cumulative = 2 ,
683618}
684619impl AggregationTemporality {
0 commit comments