Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated messages and fields from metrics #342

Merged
merged 3 commits into from
Jan 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
224 changes: 10 additions & 214 deletions opentelemetry/proto/metrics/v1/metrics.proto
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ message InstrumentationLibraryMetrics {
// when the start time is truly unknown, setting StartTimeUnixNano is
// strongly encouraged.
message Metric {
reserved 4, 6, 8;

// name of the metric, including its DNS name prefix. It must be unique.
string name = 1;

Expand All @@ -172,28 +174,8 @@ message Metric {
// reported value type for the data points, as well as the relatationship to
// the time interval over which they are reported.
oneof data {
// IntGauge and IntSum are deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `int_gauge` and `int_sum` fields.
// 2. New senders, which are aware of this change MUST send only `gauge`
// and `sum` fields.
// 3. New receivers, which are aware of this change MUST convert these into
// `gauge` and `sum` by using the provided as_int field in the oneof values.
// This field will be removed in ~3 months, on July 1, 2021.
IntGauge int_gauge = 4 [deprecated = true];
Gauge gauge = 5;
// This field will be removed in ~3 months, on July 1, 2021.
IntSum int_sum = 6 [deprecated = true];
Sum sum = 7;

// IntHistogram is deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `int_histogram` field.
// 2. New senders, which are aware of this change MUST send only `histogram`.
// 3. New receivers, which are aware of this change MUST convert this into
// `histogram` by simply converting all int64 values into float.
// This field will be removed in ~3 months, on July 1, 2021.
IntHistogram int_histogram = 8 [deprecated = true];
Histogram histogram = 9;
ExponentialHistogram exponential_histogram = 10;
Summary summary = 11;
Expand Down Expand Up @@ -348,20 +330,12 @@ enum DataPointFlags {
// NumberDataPoint is a single data point in a timeseries that describes the
// time-varying scalar value of a metric.
message NumberDataPoint {
reserved 1;

// The set of key/value pairs that uniquely identify the timeseries from
// where this point belongs. The list may be empty (may contain 0 elements).
repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;

// Labels is deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `labels` field.
// 2. New senders, which are aware of this change MUST send only `attributes`.
// 3. New receivers, which are aware of this change MUST convert this into
// `labels` by simply converting all int64 values into float.
//
// This field will be removed in ~3 months, on July 1, 2021.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true];

// StartTimeUnixNano is optional but strongly encouraged, see the
// the detailed comments above Metric.
//
Expand Down Expand Up @@ -402,20 +376,12 @@ message NumberDataPoint {
// "explicit_bounds" and "bucket_counts" must be omitted and only "count" and
// "sum" are known.
message HistogramDataPoint {
reserved 1;

// The set of key/value pairs that uniquely identify the timeseries from
// where this point belongs. The list may be empty (may contain 0 elements).
repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;

// Labels is deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `labels` field.
// 2. New senders, which are aware of this change MUST send only `attributes`.
// 3. New receivers, which are aware of this change MUST convert this into
// `labels` by simply converting all int64 values into float.
//
// This field will be removed in ~3 months, on July 1, 2021.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true];

// StartTimeUnixNano is optional but strongly encouraged, see the
// the detailed comments above Metric.
//
Expand Down Expand Up @@ -580,20 +546,12 @@ message ExponentialHistogramDataPoint {
// SummaryDataPoint is a single data point in a timeseries that describes the
// time-varying values of a Summary metric.
message SummaryDataPoint {
reserved 1;

// The set of key/value pairs that uniquely identify the timeseries from
// where this point belongs. The list may be empty (may contain 0 elements).
repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;

// Labels is deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `labels` field.
// 2. New senders, which are aware of this change MUST send only `attributes`.
// 3. New receivers, which are aware of this change MUST convert this into
// `labels` by simply converting all int64 values into float.
//
// This field will be removed in ~3 months, on July 1, 2021.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1 [deprecated = true];

// StartTimeUnixNano is optional but strongly encouraged, see the
// the detailed comments above Metric.
//
Expand Down Expand Up @@ -653,22 +611,13 @@ message SummaryDataPoint {
// was recorded, for example the span and trace ID of the active span when the
// exemplar was recorded.
message Exemplar {
reserved 1;

// The set of key/value pairs that were filtered out by the aggregator, but
// recorded alongside the original measurement. Only key/value pairs that were
// filtered out by the aggregator should be included
repeated opentelemetry.proto.common.v1.KeyValue filtered_attributes = 7;

// Labels is deprecated and will be removed soon.
// 1. Old senders and receivers that are not aware of this change will
// continue using the `filtered_labels` field.
// 2. New senders, which are aware of this change MUST send only
// `filtered_attributes`.
// 3. New receivers, which are aware of this change MUST convert this into
// `filtered_labels` by simply converting all int64 values into float.
//
// This field will be removed in ~3 months, on July 1, 2021.
repeated opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1 [deprecated = true];

// time_unix_nano is the exact time when this exemplar was recorded
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
Expand All @@ -693,156 +642,3 @@ message Exemplar {
// or if the trace is not sampled.
bytes trace_id = 5;
}

//
// Move deprecated messages below this line
//

// IntDataPoint is deprecated. Use integer value in NumberDataPoint.
message IntDataPoint {
option deprecated = true;

// The set of labels that uniquely identify this timeseries.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1;

// StartTimeUnixNano is optional but strongly encouraged, see the
// the detailed comments above Metric.
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
// 1970.
fixed64 start_time_unix_nano = 2;

// TimeUnixNano is required, see the detailed comments above Metric.
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
// 1970.
fixed64 time_unix_nano = 3;

// value itself.
sfixed64 value = 4;

// (Optional) List of exemplars collected from
// measurements that were used to form the data point
repeated IntExemplar exemplars = 5;
}

// IntGauge is deprecated. Use Gauge with an integer value in NumberDataPoint.
message IntGauge {
option deprecated = true;

repeated IntDataPoint data_points = 1;
}

// IntSum is deprecated. Use Sum with an integer value in NumberDataPoint.
message IntSum {
option deprecated = true;

repeated IntDataPoint data_points = 1;

// aggregation_temporality describes if the aggregator reports delta changes
// since last report time, or cumulative changes since a fixed start time.
AggregationTemporality aggregation_temporality = 2;

// If "true" means that the sum is monotonic.
bool is_monotonic = 3;
}

// IntHistogramDataPoint is deprecated; use HistogramDataPoint.
message IntHistogramDataPoint {
option deprecated = true;

// The set of labels that uniquely identify this timeseries.
repeated opentelemetry.proto.common.v1.StringKeyValue labels = 1;

// StartTimeUnixNano is optional but strongly encouraged, see the
// the detailed comments above Metric.
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
// 1970.
fixed64 start_time_unix_nano = 2;

// TimeUnixNano is required, see the detailed comments above Metric.
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
// 1970.
fixed64 time_unix_nano = 3;

// count is the number of values in the population. Must be non-negative. This
// value must be equal to the sum of the "count" fields in buckets if a
// histogram is provided.
fixed64 count = 4;

// sum of the values in the population. If count is zero then this field
// must be zero. This value must be equal to the sum of the "sum" fields in
// buckets if a histogram is provided.
sfixed64 sum = 5;

// bucket_counts is an optional field contains the count values of histogram
// for each bucket.
//
// The sum of the bucket_counts must equal the value in the count field.
//
// The number of elements in bucket_counts array must be by one greater than
// the number of elements in explicit_bounds array.
repeated fixed64 bucket_counts = 6;

// explicit_bounds specifies buckets with explicitly defined bounds for values.
//
// The boundaries for bucket at index i are:
//
// (-infinity, explicit_bounds[i]] for i == 0
// (explicit_bounds[i-1], explicit_bounds[i]] for 0 < i < size(explicit_bounds)
// (explicit_bounds[i-1], +infinity) for i == size(explicit_bounds)
//
// The values in the explicit_bounds array must be strictly increasing.
//
// Histogram buckets are inclusive of their upper boundary, except the last
// bucket where the boundary is at infinity. This format is intentionally
// compatible with the OpenMetrics histogram definition.
repeated double explicit_bounds = 7;

// (Optional) List of exemplars collected from
// measurements that were used to form the data point
repeated IntExemplar exemplars = 8;
}

// IntHistogram is deprecated, replaced by Histogram points using double-
// valued exemplars.
message IntHistogram {
option deprecated = true;

repeated IntHistogramDataPoint data_points = 1;

// aggregation_temporality describes if the aggregator reports delta changes
// since last report time, or cumulative changes since a fixed start time.
AggregationTemporality aggregation_temporality = 2;
}

// IntExemplar is deprecated. Use Exemplar with as_int for value
message IntExemplar {
option deprecated = true;

// The set of labels that were filtered out by the aggregator, but recorded
// alongside the original measurement. Only labels that were filtered out
// by the aggregator should be included
repeated opentelemetry.proto.common.v1.StringKeyValue filtered_labels = 1;

// time_unix_nano is the exact time when this exemplar was recorded
//
// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January
// 1970.
fixed64 time_unix_nano = 2;

// Numerical int value of the measurement that was recorded.
sfixed64 value = 3;

// (Optional) Span ID of the exemplar trace.
// span_id may be missing if the measurement is not recorded inside a trace
// or if the trace is not sampled.
bytes span_id = 4;

// (Optional) Trace ID of the exemplar trace.
// trace_id may be missing if the measurement is not recorded inside a trace
// or if the trace is not sampled.
bytes trace_id = 5;
}