Skip to content

Commit

Permalink
Consistency between Span and Resource attributes (open-telemetry#777)
Browse files Browse the repository at this point in the history
* Consistency between Span and Resource attributes

* Address feedback

* Wording
  • Loading branch information
thisthat authored and jsuereth committed Nov 16, 2023
1 parent c82cc03 commit 19fced8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions specification/common/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ Attributes are a list of zero or more key-value pairs. An `Attribute` MUST have
i.e. it MUST NOT contain values of different types. For protocols that do
not natively support array values such values SHOULD be represented as JSON strings.

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.

`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`
values, they MAY replace those values by 0, `false`, or empty strings.
Expand Down

0 comments on commit 19fced8

Please sign in to comment.