-
Notifications
You must be signed in to change notification settings - Fork 894
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
Conversation
…standard attribute spec
This was previously an undefined behavior, the PR defines the behavior now and I think such changes should be allowed for Stable documents. @open-telemetry/specs-approvers any objections to this approach to stability? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The spec is stable, but I think that it is rather a clarification
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this open for a while to allow time to object in case someone thinks this is a breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine clarification, but that this information is already implied. The common knowledge definition of a map doesn't support duplicate keys. The common knowledge definition of a string is case sensitive, unless specified otherwise.
🤷
Side note: Actually some logging libraries allow duplicate keys (https://go.dev/play/p/fzIswL0Le7j). OTLP (and JSON) allows also passing such data. EDIT: I will create a separate issue (or PR for it). |
Still good to merge this PR, given this detail, for the March's release? |
@carlosalberto It is good to merge (even if we decide to remove it later). EDIT: I created #3931 |
@pellared Oops, lint is failing. |
The failure is not caused by the changes from this PR. |
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. |
There was a problem hiding this comment.
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).
Changing to draft per #3938. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
Per #3853 (comment)
Changes
Add clarifications to
map<string, any>
taken from https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/common and make the description more normative.The spec is stable, but I think that it is rather a clarification or/and straightforward standardization.