Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 52bd5a5

Browse files
g-easyBogdan Drutu
authored andcommitted
Add clarifying comments to metrics.proto. (#58)
1 parent 9a6e568 commit 52bd5a5

1 file changed

Lines changed: 14 additions & 4 deletions

File tree

opencensus/proto/stats/metrics/metrics.proto

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
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+
1520
syntax = "proto3";
1621

1722
package opencensus.proto.stats.metrics;
@@ -23,15 +28,18 @@ option java_multiple_files = true;
2328
option java_package = "io.opencensus.proto.metrics";
2429
option java_outer_classname = "MetricsProto";
2530

26-
// A collection of Metrics.
31+
// A collection of Metrics, used for batching.
2732
message 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.
3338
message 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.
4351
message 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

Comments
 (0)