Skip to content

Commit

Permalink
Clarify that attribute keys are unique in collections
Browse files Browse the repository at this point in the history
Attributes keys must be unique. The key/value pair collections in the specification
was always intended to model a map.

There was a recent confusion about this. This change clarifies the spec.

Resolves open-telemetry#2245
  • Loading branch information
tigrannajaryan committed Jan 6, 2022
1 parent 8e29f55 commit 49740f3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions specification/common/common.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,14 @@ attribute limits for Resources.
Attributes, which belong to Metrics, are exempt from the limits described above
at this time, as discussed in
[Metrics Attribute Limits](../metrics/sdk.md#attribute-limits).

## Attribute Collections

[Resources](../resource/sdk.md), Metrics
[data points](../metrics/datamodel.md#metric-points),
[Spans](../trace/api.md#set-attributes), Span
[Events](../trace/api.md#add-events), Span
[Links](../trace/api.md#specifying-links) and
[Log Records](../logs/data-model.md) may contain a collection of attributes. The
keys in each such collection are unique, i.e. there cannot exit more than one
key-value pair with the same key.

0 comments on commit 49740f3

Please sign in to comment.