-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Prototype] attribute: add complex value types #6809
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
base: main
Are you sure you want to change the base?
Conversation
|
@open-telemetry/go-maintainers, do you think that there anything more that I should add/check in order to validate the open-telemetry/opentelemetry-specification#4485? |
|
SIG meeting: |
| } | ||
|
|
||
| // MapValue creates a MAP Value. | ||
| // v is sorted by key. |
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.
We should also deduplicate keys, but this is an implementation detail not relevant for the prototype.
| // | ||
| // If creating both a key and value at the same time, use the provided | ||
| // convenience function instead -- Slice(name, value). | ||
| func (k Key) Slice(v []Value) KeyValue { |
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.
This should be better called Array to match the OTel Spec.
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.
😁 For reference only, a recommendation from AI: Sequence.
I consulted AI to obtain an answer based on a neutral stance across multiple languages.
https://chatgpt.com/share/68beda19-2a1c-800c-8eb6-0e31bf7a8170 —— The content is in Chinese; please translate it into English yourself for reference.
Prototype for open-telemetry/opentelemetry-specification#4485
This PR is to validate that it is possible to extend attributes with complex attributes without making breaking changes and making sure that
Valueis still comparable.It does not implement everything. I was just focused how we are able to handle the following new attribute value types in a backwards compatible way:
This PR does not update the code dependent on attributes package. Exporters do not export complex attributes and the Logs API do not use this package. Nothing prevents doing it and I think this is not necessary to validate the OTEP.