1212// See the License for the specific language governing permissions and
1313// limitations under the License.
1414
15+ // This package describes the Metrics data model. It is currently experimental
16+ // but may eventually become the wire format for metrics. Please see
17+ // https://github.com/census-instrumentation/opencensus-specs/blob/master/stats/Metrics.md
18+ // for more details.
19+
1520syntax = "proto3" ;
1621
1722package opencensus.proto.stats.metrics ;
@@ -23,15 +28,18 @@ option java_multiple_files = true;
2328option java_package = "io.opencensus.proto.metrics" ;
2429option java_outer_classname = "MetricsProto" ;
2530
26- // A collection of Metrics.
31+ // A collection of Metrics, used for batching .
2732message MetricSet {
2833 // Each Metric has one or more timeseries.
2934 repeated Metric metrics = 1 ;
3035}
3136
3237// Defines a Metric which has one or more timeseries.
3338message Metric {
34- // The description of the metric.
39+ // The definition of the Metric. For now, we send the full MetricDescriptor
40+ // every time in order to keep the protocol stateless, but this is one of the
41+ // places where we can make future changes to make the protocol more
42+ // efficient.
3543 MetricDescriptor metric_descriptor = 1 ;
3644
3745 // One or more timeseries for a single metric, where each timeseries has
@@ -41,7 +49,6 @@ message Metric {
4149
4250// Defines a metric type and its schema.
4351message MetricDescriptor {
44- // TODO: Add restrictions for characters that can be used.
4552 // The metric type, including its DNS name prefix. It must be unique.
4653 string name = 1 ;
4754
@@ -103,7 +110,10 @@ message GaugePoint {
103110 // A 64-bit double-precision floating-point number.
104111 double double_value = 3 ;
105112
106- // TODO: Add support for Summary type.
113+ // TODO: Add support for Summary type. This is an aggregation that produces
114+ // percentiles directly.
115+ //
116+ // See also: https://prometheus.io/docs/concepts/metric_types/#summary
107117 }
108118}
109119
0 commit comments