Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Support maps and heterogeneous arrays as attribute values #2888
Support maps and heterogeneous arrays as attribute values #2888
Changes from 9 commits
8c497e3
c0ef00f
c2d2941
1a385e7
b15695c
5e0d081
5ccaaf0
dc31a43
4f5e141
58cbb1a
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Should we also include a byte array (as for logs attributes)?
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 normative statement is meaningless. Users define attributes not OTel SDKs.
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 is for semantic convention authors. Will be moved to semconv repo.
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.
Makes sense. Can we track that with an issue if this merges?
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 is not viable. Stable implementations have already been released for this signal. Those implementations already accept attributes. Adding this statement here is hiding 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.
@jack-berg actually implemented this and found it to be possible in non-breaking manner for Java.
Do you think it is impossible to do for Go in a non-breaking way?
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.
Thanks for the link to the example implementation, I missed that. I'm not that knowledgeable in Java, but I don't see in that implementation where it restricts attributes values in the metric signal.
The Go implementation passes the same type
attribute.KeyValue
to both the metric and trace signal. We will not be able to allow some values to be passed to the trace signal but not the metric signal.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.
OK, that is very important. If we think this is impossible to implement in non-breaking way then it is a blocker, we can't accept the PR.
I would like to take a closer look at Go implementation and see if we can find a non-breaking way to apply this change.
Since this came up I would also want to be more careful and check some other languages (strongly typed/compiled languages are most likely to be impacted).
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 the alternative could be to describe in metrics SDK specification how the SDK should/must handle such cases (when these types of attributes are passed).
Moreover, it would be good to add a rationale what are the reasons to have these constraints.