Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify whether keys in attribute lists are expected to be unique #2245

Closed
achille-roussel opened this issue Jan 4, 2022 · 4 comments · Fixed by #2248
Closed

Specify whether keys in attribute lists are expected to be unique #2245

achille-roussel opened this issue Jan 4, 2022 · 4 comments · Fixed by #2248
Assignees
Labels
spec:miscellaneous For issues that don't match any other spec label

Comments

@achille-roussel
Copy link

Hello,

I'm opening this issue as a follow up to a discussion in open-telemetry/opentelemetry-proto#346 (comment) where it appeared unclear whether processors of telemetry data should be designed to support repeating keys in attribute lists.

I do not know what the right answer should be, but I couldn't find a definitive statement in the Attributes Specification to help guide design decisions that would depend on this information.

There is one mention of "unique keys" in the Attributes Limits, but it is unclear whether "unique" refers to keys being unique or the number of keys in the attribute lists:

  • set a limit of unique attribute keys such that:
    • for each unique attribute key, addition of which would result in exceeding the limit, SDK MUST discard that key/value pair.

Let me know if I can provide any more context that could help address this issue.

@achille-roussel achille-roussel added the spec:miscellaneous For issues that don't match any other spec label label Jan 4, 2022
@bogdandrutu
Copy link
Member

@tigrannajaryan do you remember this?

I remember for sure that we said we have a map "semantic" there https://github.com/open-telemetry/opentelemetry-proto/blob/main/opentelemetry/proto/resource/v1/resource.proto#L28, if that is not the case we have huge problem in the collector :))

@Oberon00
Copy link
Member

Oberon00 commented Jan 5, 2022

I remember (actually I just saw it by accident when I opened my Thread list) we had a short Thread on Slack 4 months ago: https://cloud-native.slack.com/archives/C01N7PP1THC/p1630920628020600?thread_ts=1630790115.020300&cid=C01N7PP1THC

At that time I wrote:

There is https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#set-attributes

Setting an attribute with the same key as an existing attribute SHOULD overwrite the existing attribute's value.

Which currently only applies to Span.SetAttribute. IMHO we should move that to the overall attribute definition, otherwise it doesn't even apply to https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/api.md#span-creation

Would not be surprised if it is still unspecified for Span Creation, Resources, Metric attributes (at least I did not follow up at that time).

@tigrannajaryan
Copy link
Member

We need to clarify the spec. It is not allowed (and never was AFAIK) to have more than one attribute with the same key.

tigrannajaryan added a commit to tigrannajaryan/opentelemetry-proto that referenced this issue Jan 5, 2022
Attributes keys must be unique. The key/value pair list in the protocol
was always intended to model a map.

Contributes to open-telemetry/opentelemetry-specification#2245
@tigrannajaryan
Copy link
Member

Clarification in proto open-telemetry/opentelemetry-proto#350

Probably also need a clarification in the spec.

tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 6, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 6, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 6, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 6, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 20, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 24, 2022
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
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-proto that referenced this issue Jan 24, 2022
Attributes keys must be unique. The key/value pair list in the protocol
was always intended to model a map.

Contributes to open-telemetry/opentelemetry-specification#2245
tigrannajaryan added a commit to tigrannajaryan/opentelemetry-specification that referenced this issue Jan 26, 2022
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
tigrannajaryan added a commit that referenced this issue Jan 26, 2022
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 #2245
bogdandrutu added a commit to open-telemetry/opentelemetry-proto that referenced this issue Feb 3, 2022
Attributes keys must be unique. The key/value pair list in the protocol
was always intended to model a map.

Contributes to open-telemetry/opentelemetry-specification#2245

Co-authored-by: Bogdan Drutu <[email protected]>
ChengJinbao added a commit to ChengJinbao/opentelemetry-specification that referenced this issue Nov 16, 2022
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/opentelemetry-specification#2245
jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 7, 2023
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/opentelemetry-specification#2245
AlexanderWert pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 10, 2023
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/opentelemetry-specification#2245
jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
jack-berg pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
jsuereth pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
jsuereth pushed a commit to jack-berg/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
jsuereth pushed a commit to open-telemetry/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
jsuereth pushed a commit to open-telemetry/semantic-conventions that referenced this issue Nov 16, 2023
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/opentelemetry-specification#2245
joaopgrassi pushed a commit to dynatrace-oss-contrib/semantic-conventions that referenced this issue Jan 10, 2024
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/opentelemetry-specification#2245
joaopgrassi pushed a commit to dynatrace-oss-contrib/semantic-conventions that referenced this issue Jan 10, 2024
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/opentelemetry-specification#2245
pyohannes pushed a commit to pyohannes/semantic-conventions that referenced this issue Jan 17, 2024
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/opentelemetry-specification#2245
pyohannes pushed a commit to pyohannes/semantic-conventions that referenced this issue Jan 17, 2024
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/opentelemetry-specification#2245
joaopgrassi pushed a commit to dynatrace-oss-contrib/semantic-conventions that referenced this issue Mar 21, 2024
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/opentelemetry-specification#2245
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:miscellaneous For issues that don't match any other spec label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants