Skip to content

Commit

Permalink
Define null as an invalid value for attributes and declare attempts…
Browse files Browse the repository at this point in the history
… to set `null` as undefined behavior (open-telemetry#992)
  • Loading branch information
arminru authored Sep 25, 2020
1 parent 9bc41f6 commit d0c30d5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Updates:
([#875](https://github.com/open-telemetry/opentelemetry-specification/pull/875))
- 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),
Expand Down
1 change: 1 addition & 0 deletions spec-compliance-matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,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 | + | + | + | + | + | + | + | + | - | + |
Expand Down
8 changes: 4 additions & 4 deletions specification/common/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit d0c30d5

Please sign in to comment.