3
3
/// storage, OR can be embedded by other protocols that transfer OTLP metrics
4
4
/// data but do not implement the OTLP protocol.
5
5
///
6
+ /// MetricsData
7
+ /// └─── ResourceMetrics
8
+ /// ├── Resource
9
+ /// ├── SchemaURL
10
+ /// └── ScopeMetrics
11
+ /// ├── Scope
12
+ /// ├── SchemaURL
13
+ /// └── Metric
14
+ /// ├── Name
15
+ /// ├── Description
16
+ /// ├── Unit
17
+ /// └── data
18
+ /// ├── Gauge
19
+ /// ├── Sum
20
+ /// ├── Histogram
21
+ /// ├── ExponentialHistogram
22
+ /// └── Summary
23
+ ///
6
24
/// The main difference between this message and collector protocol is that
7
25
/// in this message there will not be any "control" or "metadata" specific to
8
26
/// OTLP protocol.
@@ -71,7 +89,6 @@ pub struct ScopeMetrics {
71
89
///
72
90
/// <https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md>
73
91
///
74
- ///
75
92
/// The data model and relation between entities is shown in the
76
93
/// diagram below. Here, "DataPoint" is the term used to refer to any
77
94
/// one of the specific data point value types, and "points" is the term used
@@ -83,7 +100,7 @@ pub struct ScopeMetrics {
83
100
/// - DataPoint contains timestamps, attributes, and one of the possible value type
84
101
/// fields.
85
102
///
86
- /// Metric
103
+ /// Metric
87
104
/// +------------+
88
105
/// |name |
89
106
/// |description |
@@ -277,6 +294,9 @@ pub struct ExponentialHistogram {
277
294
/// data type. These data points cannot always be merged in a meaningful way.
278
295
/// While they can be useful in some applications, histogram data points are
279
296
/// recommended for new applications.
297
+ /// Summary metrics do not have an aggregation temporality field. This is
298
+ /// because the count and sum fields of a SummaryDataPoint are assumed to be
299
+ /// cumulative values.
280
300
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
281
301
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
282
302
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
@@ -587,7 +607,8 @@ pub mod exponential_histogram_data_point {
587
607
}
588
608
}
589
609
/// SummaryDataPoint is a single data point in a timeseries that describes the
590
- /// time-varying values of a Summary metric.
610
+ /// time-varying values of a Summary metric. The count and sum fields represent
611
+ /// cumulative values.
591
612
#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
592
613
#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
593
614
#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
0 commit comments