33/// storage, OR can be embedded by other protocols that transfer OTLP metrics
44/// data but do not implement the OTLP protocol.
55///
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+ ///
624/// The main difference between this message and collector protocol is that
725/// in this message there will not be any "control" or "metadata" specific to
826/// OTLP protocol.
@@ -71,7 +89,6 @@ pub struct ScopeMetrics {
7189///
7290/// <https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/data-model.md>
7391///
74- ///
7592/// The data model and relation between entities is shown in the
7693/// diagram below. Here, "DataPoint" is the term used to refer to any
7794/// one of the specific data point value types, and "points" is the term used
@@ -83,7 +100,7 @@ pub struct ScopeMetrics {
83100/// - DataPoint contains timestamps, attributes, and one of the possible value type
84101/// fields.
85102///
86- /// Metric
103+ /// Metric
87104/// +------------+
88105/// |name |
89106/// |description |
@@ -277,6 +294,9 @@ pub struct ExponentialHistogram {
277294/// data type. These data points cannot always be merged in a meaningful way.
278295/// While they can be useful in some applications, histogram data points are
279296/// 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.
280300#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
281301#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
282302#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
@@ -587,7 +607,8 @@ pub mod exponential_histogram_data_point {
587607 }
588608}
589609/// 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.
591612#[ cfg_attr( feature = "with-schemars" , derive( schemars:: JsonSchema ) ) ]
592613#[ cfg_attr( feature = "with-serde" , derive( serde:: Serialize , serde:: Deserialize ) ) ]
593614#[ cfg_attr( feature = "with-serde" , serde( rename_all = "camelCase" ) ) ]
0 commit comments