diff --git a/CHANGELOG.md b/CHANGELOG.md index 91b3c88ae..435f6f78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,8 @@ Full list of differences found in [this compare.](https://github.com/open-teleme * :stop_sign: [DEPRECATION] Deprecate IntSum, IntGauge, and IntDataPoint (#278) * :stop_sign: [DEPRECATION] Deprecate IntExemplar (#281) * :stop_sign: [DEPRECATION] Deprecate IntHistogram (#270) +* :stop_sign: [BREAKING] Deprecate `labels` field from NumberDataPoint, HistogramDataPoint, SummaryDataPoint and add equivalent `attributes` field (#283) +* :stop_sign: [BREAKING] Deprecate `filtered_labels` field from Exemplars and add equivalent `filtered_attributes` field (#283) * :stop_sign: [BREAKING] Rename DoubleGauge to Gauge (#278) * :stop_sign: [BREAKING] Rename DoubleSum to Sum (#278) * :stop_sign: [BREAKING] Rename DoubleDataPoint to NumberDataPoint (#278) diff --git a/opentelemetry/proto/common/v1/common.proto b/opentelemetry/proto/common/v1/common.proto index 214c21823..079ed2625 100644 --- a/opentelemetry/proto/common/v1/common.proto +++ b/opentelemetry/proto/common/v1/common.proto @@ -65,6 +65,8 @@ message KeyValue { // StringKeyValue is a pair of key/value strings. This is the simpler (and faster) version // of KeyValue that only supports string values. message StringKeyValue { + option deprecated = true; + string key = 1; string value = 2; } diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index a05b710fd..df7b0d985 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -350,8 +350,19 @@ message IntDataPoint { // NumberDataPoint is a single data point in a timeseries that describes the // time-varying value of a double metric. message NumberDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 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]; // start_time_unix_nano is the last time when the aggregation value was reset // to "zero". For some metric types this is ignored, see data types for more @@ -474,8 +485,19 @@ message IntHistogramDataPoint { // "explicit_bounds" and "bucket_counts" must be omitted and only "count" and // "sum" are known. message HistogramDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 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]; // start_time_unix_nano is the last time when the aggregation value was reset // to "zero". For some metric types this is ignored, see data types for more @@ -540,8 +562,19 @@ message HistogramDataPoint { // SummaryDataPoint is a single data point in a timeseries that describes the // time-varying values of a Summary metric. message SummaryDataPoint { - // The set of labels that uniquely identify this timeseries. - repeated opentelemetry.proto.common.v1.StringKeyValue labels = 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]; // start_time_unix_nano is the last time when the aggregation value was reset // to "zero". For some metric types this is ignored, see data types for more @@ -629,10 +662,21 @@ message IntExemplar { // was recorded, for example the span and trace ID of the active span when the // exemplar was recorded. message Exemplar { - // 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; + // 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 //