Skip to content

Commit 9815b34

Browse files
authored
all: drop attribute values restrictions (#707)
* all: drop attribute values restrictions * add changelog entry * revert wording * revert wording * Revise changelog with important attribute values note * more explicit changelog entry * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md
1 parent 570bf8a commit 9815b34

File tree

7 files changed

+23
-90
lines changed

7 files changed

+23
-90
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ The full list of changes can be found in the compare view for the respective rel
1010
- profiles: add a note about cardinality implications for attribute values. [#713](https://github.com/open-telemetry/opentelemetry-proto/pull/713)
1111
- profiles: rename line -> lines and sample -> samples since they are repeated fields. [#712](https://github.com/open-telemetry/opentelemetry-proto/pull/712)
1212

13+
### Changed
14+
15+
- all: drop attribute values restrictions. [#707](https://github.com/open-telemetry/opentelemetry-proto/pull/707)<br>
16+
⚠️ **IMPORTANT**: OTLP consumers are expected to accept attribute values that were previously considered invalid.
17+
All attributes can now contain:
18+
- empty values,
19+
- bytes values,
20+
- array values different than array of string values, bool values, int values, double values,
21+
- kvlist values.
22+
1323
### Removed
1424

1525
- profiles: remove aggregation temporality enum and field. [#710](https://github.com/open-telemetry/opentelemetry-proto/pull/710)

opentelemetry/proto/common/v1/common.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ message ArrayValue {
5454
message KeyValueList {
5555
// A collection of key/value pairs of key-value pairs. The list may be empty (may
5656
// contain 0 elements).
57+
//
5758
// The keys MUST be unique (it is not allowed to have more than one
5859
// value with the same key).
60+
// The behavior of software that receives duplicated keys can be unpredictable.
5961
repeated KeyValue values = 1;
6062
}
6163

@@ -83,6 +85,7 @@ message InstrumentationScope {
8385
// Additional attributes that describe the scope. [Optional].
8486
// Attribute keys MUST be unique (it is not allowed to have more than one
8587
// attribute with the same key).
88+
// The behavior of software that receives duplicated keys can be unpredictable.
8689
repeated KeyValue attributes = 3;
8790

8891
// The number of attributes that were discarded. Attributes

opentelemetry/proto/logs/v1/logs.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ message LogRecord {
174174
// Additional attributes that describe the specific event occurrence. [Optional].
175175
// Attribute keys MUST be unique (it is not allowed to have more than one
176176
// attribute with the same key).
177+
// The behavior of software that receives duplicated keys can be unpredictable.
177178
repeated opentelemetry.proto.common.v1.KeyValue attributes = 6;
178179
uint32 dropped_attributes_count = 7;
179180

opentelemetry/proto/metrics/v1/metrics.proto

Lines changed: 5 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ message Metric {
215215
// for lossless roundtrip translation to / from another data model.
216216
// Attribute keys MUST be unique (it is not allowed to have more than one
217217
// attribute with the same key).
218+
// The behavior of software that receives duplicated keys can be unpredictable.
218219
repeated opentelemetry.proto.common.v1.KeyValue metadata = 12;
219220
}
220221

@@ -387,16 +388,7 @@ message NumberDataPoint {
387388
// where this point belongs. The list may be empty (may contain 0 elements).
388389
// Attribute keys MUST be unique (it is not allowed to have more than one
389390
// attribute with the same key).
390-
//
391-
// The attribute values SHOULD NOT contain empty values.
392-
// The attribute values SHOULD NOT contain bytes values.
393-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
394-
// double values.
395-
// The attribute values SHOULD NOT contain kvlist values.
396-
// The behavior of software that receives attributes containing such values can be unpredictable.
397-
// These restrictions can change in a minor release.
398-
// The restrictions take origin from the OpenTelemetry specification:
399-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
391+
// The behavior of software that receives duplicated keys can be unpredictable.
400392
repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;
401393

402394
// StartTimeUnixNano is optional but strongly encouraged, see the
@@ -445,16 +437,7 @@ message HistogramDataPoint {
445437
// where this point belongs. The list may be empty (may contain 0 elements).
446438
// Attribute keys MUST be unique (it is not allowed to have more than one
447439
// attribute with the same key).
448-
//
449-
// The attribute values SHOULD NOT contain empty values.
450-
// The attribute values SHOULD NOT contain bytes values.
451-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
452-
// double values.
453-
// The attribute values SHOULD NOT contain kvlist values.
454-
// The behavior of software that receives attributes containing such values can be unpredictable.
455-
// These restrictions can change in a minor release.
456-
// The restrictions take origin from the OpenTelemetry specification:
457-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
440+
// The behavior of software that receives duplicated keys can be unpredictable.
458441
repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;
459442

460443
// StartTimeUnixNano is optional but strongly encouraged, see the
@@ -539,16 +522,7 @@ message ExponentialHistogramDataPoint {
539522
// where this point belongs. The list may be empty (may contain 0 elements).
540523
// Attribute keys MUST be unique (it is not allowed to have more than one
541524
// attribute with the same key).
542-
//
543-
// The attribute values SHOULD NOT contain empty values.
544-
// The attribute values SHOULD NOT contain bytes values.
545-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
546-
// double values.
547-
// The attribute values SHOULD NOT contain kvlist values.
548-
// The behavior of software that receives attributes containing such values can be unpredictable.
549-
// These restrictions can change in a minor release.
550-
// The restrictions take origin from the OpenTelemetry specification:
551-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
525+
// The behavior of software that receives duplicated keys can be unpredictable.
552526
repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;
553527

554528
// StartTimeUnixNano is optional but strongly encouraged, see the
@@ -665,16 +639,7 @@ message SummaryDataPoint {
665639
// where this point belongs. The list may be empty (may contain 0 elements).
666640
// Attribute keys MUST be unique (it is not allowed to have more than one
667641
// attribute with the same key).
668-
//
669-
// The attribute values SHOULD NOT contain empty values.
670-
// The attribute values SHOULD NOT contain bytes values.
671-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
672-
// double values.
673-
// The attribute values SHOULD NOT contain kvlist values.
674-
// The behavior of software that receives attributes containing such values can be unpredictable.
675-
// These restrictions can change in a minor release.
676-
// The restrictions take origin from the OpenTelemetry specification:
677-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
642+
// The behavior of software that receives duplicated keys can be unpredictable.
678643
repeated opentelemetry.proto.common.v1.KeyValue attributes = 7;
679644

680645
// StartTimeUnixNano is optional but strongly encouraged, see the

opentelemetry/proto/profiles/v1development/profiles.proto

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -149,16 +149,6 @@ message ProfilesDictionary {
149149
// "abc.com/myattribute": true
150150
// "allocation_size": 128 bytes
151151
//
152-
// The attribute values SHOULD NOT contain empty values.
153-
// The attribute values SHOULD NOT contain bytes values.
154-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
155-
// double values.
156-
// The attribute values SHOULD NOT contain kvlist values.
157-
// The behavior of software that receives attributes containing such values can be unpredictable.
158-
// These restrictions can change in a minor release.
159-
// The restrictions take origin from the OpenTelemetry specification:
160-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
161-
//
162152
// attribute_table[0] must always be zero value (KeyValueAndUnit{}) and present.
163153
repeated KeyValueAndUnit attribute_table = 6;
164154

opentelemetry/proto/resource/v1/resource.proto

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,7 @@ message Resource {
2929
// Set of attributes that describe the resource.
3030
// Attribute keys MUST be unique (it is not allowed to have more than one
3131
// attribute with the same key).
32-
//
33-
// The attribute values SHOULD NOT contain empty values.
34-
// The attribute values SHOULD NOT contain bytes values.
35-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
36-
// double values.
37-
// The attribute values SHOULD NOT contain kvlist values.
38-
// The behavior of software that receives attributes containing such values can be unpredictable.
39-
// These restrictions can change in a minor release.
40-
// The restrictions take origin from the OpenTelemetry specification:
41-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
32+
// The behavior of software that receives duplicated keys can be unpredictable.
4233
repeated opentelemetry.proto.common.v1.KeyValue attributes = 1;
4334

4435
// The number of dropped attributes. If the value is 0, then

opentelemetry/proto/trace/v1/trace.proto

Lines changed: 3 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,7 @@ message Span {
208208
//
209209
// Attribute keys MUST be unique (it is not allowed to have more than one
210210
// attribute with the same key).
211-
//
212-
// The attribute values SHOULD NOT contain empty values.
213-
// The attribute values SHOULD NOT contain bytes values.
214-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
215-
// double values.
216-
// The attribute values SHOULD NOT contain kvlist values.
217-
// The behavior of software that receives attributes containing such values can be unpredictable.
218-
// These restrictions can change in a minor release.
219-
// The restrictions take origin from the OpenTelemetry specification:
220-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
211+
// The behavior of software that receives duplicated keys can be unpredictable.
221212
repeated opentelemetry.proto.common.v1.KeyValue attributes = 9;
222213

223214
// The number of attributes that were discarded. Attributes
@@ -238,16 +229,7 @@ message Span {
238229
// A collection of attribute key/value pairs on the event.
239230
// Attribute keys MUST be unique (it is not allowed to have more than one
240231
// attribute with the same key).
241-
//
242-
// The attribute values SHOULD NOT contain empty values.
243-
// The attribute values SHOULD NOT contain bytes values.
244-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
245-
// double values.
246-
// The attribute values SHOULD NOT contain kvlist values.
247-
// The behavior of software that receives attributes containing such values can be unpredictable.
248-
// These restrictions can change in a minor release.
249-
// The restrictions take origin from the OpenTelemetry specification:
250-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
232+
// The behavior of software that receives duplicated keys can be unpredictable.
251233
repeated opentelemetry.proto.common.v1.KeyValue attributes = 3;
252234

253235
// The number of dropped attributes. If the value is 0,
@@ -280,16 +262,7 @@ message Span {
280262
// A collection of attribute key/value pairs on the link.
281263
// Attribute keys MUST be unique (it is not allowed to have more than one
282264
// attribute with the same key).
283-
//
284-
// The attribute values SHOULD NOT contain empty values.
285-
// The attribute values SHOULD NOT contain bytes values.
286-
// The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
287-
// double values.
288-
// The attribute values SHOULD NOT contain kvlist values.
289-
// The behavior of software that receives attributes containing such values can be unpredictable.
290-
// These restrictions can change in a minor release.
291-
// The restrictions take origin from the OpenTelemetry specification:
292-
// https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
265+
// The behavior of software that receives duplicated keys can be unpredictable.
293266
repeated opentelemetry.proto.common.v1.KeyValue attributes = 4;
294267

295268
// The number of dropped attributes. If the value is 0,

0 commit comments

Comments
 (0)