diff --git a/CHANGELOG.md b/CHANGELOG.md index 6fc8a4d3..c2fb12f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,16 @@ The full list of changes can be found in the compare view for the respective rel - profiles: add a note about cardinality implications for attribute values. [#713](https://github.com/open-telemetry/opentelemetry-proto/pull/713) - profiles: rename line -> lines and sample -> samples since they are repeated fields. [#712](https://github.com/open-telemetry/opentelemetry-proto/pull/712) +### Changed + +- all: drop attribute values restrictions. [#707](https://github.com/open-telemetry/opentelemetry-proto/pull/707)
+ ⚠️ **IMPORTANT**: OTLP consumers are expected to accept attribute values that were previously considered invalid. + All attributes can now contain: + - empty values, + - bytes values, + - array values different than array of string values, bool values, int values, double values, + - kvlist values. + ### Removed - profiles: remove aggregation temporality enum and field. [#710](https://github.com/open-telemetry/opentelemetry-proto/pull/710) diff --git a/opentelemetry/proto/common/v1/common.proto b/opentelemetry/proto/common/v1/common.proto index 717eb16c..7f9ffab3 100644 --- a/opentelemetry/proto/common/v1/common.proto +++ b/opentelemetry/proto/common/v1/common.proto @@ -54,8 +54,10 @@ message ArrayValue { message KeyValueList { // A collection of key/value pairs of key-value pairs. The list may be empty (may // contain 0 elements). + // // The keys MUST be unique (it is not allowed to have more than one // value with the same key). + // The behavior of software that receives duplicated keys can be unpredictable. repeated KeyValue values = 1; } @@ -83,6 +85,7 @@ message InstrumentationScope { // Additional attributes that describe the scope. [Optional]. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). + // The behavior of software that receives duplicated keys can be unpredictable. repeated KeyValue attributes = 3; // The number of attributes that were discarded. Attributes diff --git a/opentelemetry/proto/logs/v1/logs.proto b/opentelemetry/proto/logs/v1/logs.proto index 4fe11308..35770a2e 100644 --- a/opentelemetry/proto/logs/v1/logs.proto +++ b/opentelemetry/proto/logs/v1/logs.proto @@ -174,6 +174,7 @@ message LogRecord { // Additional attributes that describe the specific event occurrence. [Optional]. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 6; uint32 dropped_attributes_count = 7; diff --git a/opentelemetry/proto/metrics/v1/metrics.proto b/opentelemetry/proto/metrics/v1/metrics.proto index 2b5af1f6..04fa7d10 100644 --- a/opentelemetry/proto/metrics/v1/metrics.proto +++ b/opentelemetry/proto/metrics/v1/metrics.proto @@ -215,6 +215,7 @@ message Metric { // for lossless roundtrip translation to / from another data model. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue metadata = 12; } @@ -387,16 +388,7 @@ message NumberDataPoint { // where this point belongs. The list may be empty (may contain 0 elements). // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; // StartTimeUnixNano is optional but strongly encouraged, see the @@ -445,16 +437,7 @@ message HistogramDataPoint { // where this point belongs. The list may be empty (may contain 0 elements). // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; // StartTimeUnixNano is optional but strongly encouraged, see the @@ -539,16 +522,7 @@ message ExponentialHistogramDataPoint { // where this point belongs. The list may be empty (may contain 0 elements). // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; // StartTimeUnixNano is optional but strongly encouraged, see the @@ -665,16 +639,7 @@ message SummaryDataPoint { // where this point belongs. The list may be empty (may contain 0 elements). // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 7; // StartTimeUnixNano is optional but strongly encouraged, see the diff --git a/opentelemetry/proto/profiles/v1development/profiles.proto b/opentelemetry/proto/profiles/v1development/profiles.proto index 05481bdb..856021e1 100644 --- a/opentelemetry/proto/profiles/v1development/profiles.proto +++ b/opentelemetry/proto/profiles/v1development/profiles.proto @@ -149,16 +149,6 @@ message ProfilesDictionary { // "abc.com/myattribute": true // "allocation_size": 128 bytes // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. - // // attribute_table[0] must always be zero value (KeyValueAndUnit{}) and present. repeated KeyValueAndUnit attribute_table = 6; diff --git a/opentelemetry/proto/resource/v1/resource.proto b/opentelemetry/proto/resource/v1/resource.proto index 9b280160..42c5913c 100644 --- a/opentelemetry/proto/resource/v1/resource.proto +++ b/opentelemetry/proto/resource/v1/resource.proto @@ -29,16 +29,7 @@ message Resource { // Set of attributes that describe the resource. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 1; // The number of dropped attributes. If the value is 0, then diff --git a/opentelemetry/proto/trace/v1/trace.proto b/opentelemetry/proto/trace/v1/trace.proto index f20acea7..d6badb5c 100644 --- a/opentelemetry/proto/trace/v1/trace.proto +++ b/opentelemetry/proto/trace/v1/trace.proto @@ -208,16 +208,7 @@ message Span { // // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 9; // The number of attributes that were discarded. Attributes @@ -238,16 +229,7 @@ message Span { // A collection of attribute key/value pairs on the event. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 3; // The number of dropped attributes. If the value is 0, @@ -280,16 +262,7 @@ message Span { // A collection of attribute key/value pairs on the link. // Attribute keys MUST be unique (it is not allowed to have more than one // attribute with the same key). - // - // The attribute values SHOULD NOT contain empty values. - // The attribute values SHOULD NOT contain bytes values. - // The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values, - // double values. - // The attribute values SHOULD NOT contain kvlist values. - // The behavior of software that receives attributes containing such values can be unpredictable. - // These restrictions can change in a minor release. - // The restrictions take origin from the OpenTelemetry specification: - // https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute. + // The behavior of software that receives duplicated keys can be unpredictable. repeated opentelemetry.proto.common.v1.KeyValue attributes = 4; // The number of dropped attributes. If the value is 0,