diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ae6cbea045..40f0751a022 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,9 @@ Updates: ([#914](https://github.com/open-telemetry/opentelemetry-specification/pull/914)) - Remove obsolete `http.status_text` from semantic conventions ([#972](https://github.com/open-telemetry/opentelemetry-specification/pull/972)) +- Define `null` as an invalid value for attributes and declare attempts to set + `null` as undefined behavior + ([#992](https://github.com/open-telemetry/opentelemetry-specification/pull/992)) - SDK: Rename the `Decision` values for `SamplingResult`s to `DROP`, `RECORD_ONLY` and `RECORD_AND_SAMPLE` for consistency ([#938](https://github.com/open-telemetry/opentelemetry-specification/pull/938), diff --git a/spec-compliance-matrix.md b/spec-compliance-matrix.md index 74b052eb6e9..3d967dd4430 100644 --- a/spec-compliance-matrix.md +++ b/spec-compliance-matrix.md @@ -45,6 +45,7 @@ status of the feature is not known. |Double floating-point type | + | + | + | + | + | + | - | + | + | + | |Signed int64 type | + | + | + | + | + | + | - | + | + | + | |Array of primitives (homogeneous) | + | + | + | + | + | - | + | + | + | + | +|`null` values documented as invalid/undefined | | | | | | | | | | | |Unicode support for keys and string values | + | + | + | + | + | + | + | + | + | + | |[Span linking](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#add-links)| |AddLink | + | + | + | + | + | + | + | + | - | + | diff --git a/specification/common/common.md b/specification/common/common.md index 44f5ccf2f5d..974cf518214 100644 --- a/specification/common/common.md +++ b/specification/common/common.md @@ -25,10 +25,10 @@ Attributes SHOULD preserve the order in which they're set. Attribute values expressing a numerical value of zero, an empty string, or an empty array are considered meaningful and MUST be stored and passed on to -processors / exporters. Attribute values of `null` are considered to be not set -and get discarded as if that `Attribute` has never been created. -As an exception to this, if overwriting of values is supported, this results in -removing the attribute. +processors / exporters. + +Attribute values of `null` are not valid and attempting to set a `null` value is +undefined behavior. `null` values within arrays MUST be preserved as-is (i.e., passed on to span processors / exporters as `null`). If exporters do not support exporting `null`