-
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 handling of null and empty attribute values #459
Define handling of null and empty attribute values #459
Conversation
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.
thx for this!
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 wonder if metrics also need this kind of clarification.
CC @jmacd
Related: open-telemetry/opentelemetry-go#320
Co-Authored-By: Wolfgang Ziegler <[email protected]>
Co-Authored-By: Christian Neumüller <[email protected]>
Co-Authored-By: Christian Neumüller <[email protected]>
f625245
to
c4beea2
Compare
considered meaningful and MUST be stored and passed on to span processors / exporters. | ||
Attribute values of `null` are considered to be not set and get discarded as if | ||
that `SetAttribute` call had never been made. | ||
As an exception to this, if overwriting of values is supported, this results in |
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.
if overwriting of values is supported...
The paragraph above says that attribute overwriting SHOULD be supported, so I think there is no need for this conditional.
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.
Technically it is not but I still think this clarification might avoid some potential confusion.
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.
See #503
This is required for map/dictionary structures represented as two arrays with | ||
indices that are kept in sync (e.g., two attributes `header_keys` and `header_values`, | ||
both containing an array of strings to represent a mapping | ||
`header_keys[i] -> header_values[i]`). |
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.
👍
last sign off was from two days back. And we have enough sign offs. @bogdandrutu I remember you mentioned you want to use |
Looks like this could be added to the v0.4 milestone because this was merged after v0.3 was cut. |
* Define handling of null and empty attribute values * undefined -> not set * Apply suggestions from code review Co-Authored-By: Wolfgang Ziegler <[email protected]> * Apply suggestions from code review Co-Authored-By: Christian Neumüller <[email protected]> * Allow exporters to replace null values in arrays * Apply suggestions from code review Co-Authored-By: Christian Neumüller <[email protected]> * attribute semantics -> restrictions * emphasize MUST Co-authored-by: Wolfgang Ziegler <[email protected]> Co-authored-by: Christian Neumüller <[email protected]>
Resolves #431.
A follow-up PR might reference this definition for resource attributes as well to address #446.