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

Define case sensitivity of map<string, any> keys in Logs Data Model #3889

Closed
wants to merge 14 commits into from
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ release.
([#3884](https://github.com/open-telemetry/opentelemetry-specification/pull/3884))
- Clarify that logs attributes are a superset of standard attributes.
([#3852](https://github.com/open-telemetry/opentelemetry-specification/pull/3852))
- Define case sensitivity of `map<string, any>` keys.
([#3889](https://github.com/open-telemetry/opentelemetry-specification/pull/3889))

### Resource

Expand Down
9 changes: 6 additions & 3 deletions specification/logs/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ Value of type `any` can be one of the following:

#### Type `map<string, any>`

Value of type `map<string, any>` is a map of string keys to `any` values. The
keys in the map are unique (duplicate keys are not allowed). The representation
of the map is language-dependent.
Value of type `map<string, any>` is a map of string keys to `any` values.
Case sensitivity of keys MUST be preserved.
pellared marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if the wording here is right. "Case sensitivity MUST be preserved" logically means "if something is case sensitive, it should stay case sensitive; if something is case insensitive, it should stay case insensitive". Doesn't it? 🤔

Perhaps a better wording would be:

The keys in the map are case-sensitive and MUST be unique (duplicate keys are not allowed).

The keys in the map MUST be unique (duplicate keys are not allowed).
The enforcement of uniqueness may be performed in a variety of ways and implementations
may choose how to enforce this requirement within their limitations.
The representation of the map is language-dependent.

Arbitrary deep nesting of values for arrays and maps is allowed (essentially
allows to represent an equivalent of a JSON object).
Expand Down
Loading