Skip to content

Commit

Permalink
Centralize attributes definition (open-telemetry#722)
Browse files Browse the repository at this point in the history
* Centralize attributes definition

Signed-off-by: Bogdan Drutu <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/common/common.md

Co-authored-by: Christian Neumüller <[email protected]>

* Update specification/overview.md

Co-authored-by: Christian Neumüller <[email protected]>

Co-authored-by: Christian Neumüller <[email protected]>
  • Loading branch information
2 people authored and jsuereth committed Nov 16, 2023
1 parent 2817a7f commit 56071a8
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions specification/common/common.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Common specification concepts

<details>
<summary>
Table of Contents
</summary>

- [Attributes](#attribute)

</details>

## Attributes

Attributes are a list of zero or more key-value pairs. An `Attribute` MUST have the following properties:

- The attribute key, which MUST be a non-`null` and non-empty string.
- The attribute value, which is either:
- A primitive type: string, boolean, double precision floating point (IEEE 754-1985) or signed 64 bit integer.
- An array of primitive type values. The array MUST be homogeneous,
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.

`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.
This is required for map/dictionary structures represented as two arrays with
indices that are kept in sync (e.g., two attributes `header_keys` and `header_values`,
both containing an array of strings to represent a mapping
`header_keys[i] -> header_values[i]`).

0 comments on commit 56071a8

Please sign in to comment.