Skip to content

Commit e4f20b4

Browse files
authored
Resolves Open Feedback re: Prohibiting Complex Types (open-telemetry#3926)
## Changes Resolves open comments from PR (open-telemetry#3858) 1. Clarify the "why" w/o redefining metadata (See [comment](open-telemetry#3858 (comment))) 2. Keep all the new standard attribute content together in one place This addresses issue (open-telemetry#3925).
1 parent 5bd099a commit e4f20b4

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

specification/common/README.md

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ An `Attribute` is a key-value pair, which MUST have the following properties:
3434

3535
- The attribute key MUST be a non-`null` and non-empty string.
3636
- Case sensitivity of keys is preserved. Keys that differ in casing are treated as distinct keys.
37-
- The attribute value is either[1]:
37+
- The attribute value is either:
3838
- A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
3939
- An array of primitive type values. The array MUST be homogeneous,
4040
i.e., it MUST NOT contain values of different types.
@@ -66,23 +66,6 @@ See [Requirement Level](https://github.com/open-telemetry/semantic-conventions/b
6666
See [this document](attribute-type-mapping.md) to find out how to map values obtained
6767
outside OpenTelemetry into OpenTelemetry attribute values.
6868

69-
**[1]**: NOTE: extending the set of attribute value types is a breaking change.
70-
This was decided after extensive debate, with arguments as follows:
71-
72-
* Limiting the types of attribute values to a set which has proved sufficient
73-
during several years of OpenTelemetry's development is a useful guardrail for
74-
design. In taking additional value types off the table, we narrow the solution
75-
space and have more productive design conversations.
76-
* We proposed extending support for complex value types and received significant
77-
pushback. Removing the bounds significantly increases the burden on data
78-
consumers. Adding additional simple value types doesn't cause the same level
79-
of burden, but these can be encoded using existing primitive types. For
80-
example, datetime can be encoded as a string or 64 bit integer.
81-
* Limiting attribute value types to primitives and arrays of primitives supports
82-
OpenTelemetry's intent that attributes are metadata, and facilitates the
83-
ability for data consumers to create search indexes and perform other
84-
statistical analysis.
85-
8669
### Standard Attribute
8770

8871
Attributes are used in various places throughout the OpenTelemetry data model.
@@ -98,6 +81,21 @@ reflects that LogRecord attributes are expected to model data produced from
9881
external log APIs, which do not necessarily have the same value type
9982
restrictions as the standard attribute definition.
10083

84+
Note: Extending the set of standard attribute value types is a breaking change.
85+
This was decided after extensive debate, with arguments as follows:
86+
87+
* Limiting the types of attribute values to a set which has proved sufficient
88+
during several years of OpenTelemetry's development is a useful guardrail for
89+
design. In taking additional value types off the table, we narrow the solution
90+
space and have more productive design conversations.
91+
* Upon proposing to extend support for complex value types, we received significant
92+
pushback. Limiting attribute value types to primitives and arrays of primitives
93+
simplifies data consumers' efforts to create search indexes and perform statistical
94+
analysis.
95+
* To address concerns over restricting standard attributes to primitive types, it was
96+
called out that complex types can be encoded as existing primitive types, such as
97+
representing datetime as a string or 64 bit integer.
98+
10199
### Attribute Limits
102100

103101
Execution of erroneous code can result in unintended attributes. If there are no

0 commit comments

Comments
 (0)