-
Couldn't load subscription status.
- Fork 934
Introduce "extended attributes" term #4462
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
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.
Document that Extended Attribute term should be used to represent an extended set of standard attributes (if introduced by SDK).
This leaves the door open for reusing the same type on other signals and helps to align the type name across implementations.
This PR does not change anything in the https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md. Therefore, it does not look like addressing the intend of this PR. The changes are only targeting Logs API and Data Model and to not say anything about the usability.
However, I want to call out that the Collector SIG said that for OTel Collector attributes are already what is defined as "Extended Attributes". See:
The Go SIG are also not in favor of creating another "extended attribute" type. See: open-telemetry/opentelemetry-go#6168 (comment)
Wouldn't such change be seen as breaking given the specification defined the map<string, any> type only in the scope of Logs and not a common type?
CC @open-telemetry/collector-maintainers @open-telemetry/go-maintainers
| Implementations that define a new type to represent extended attributes SHOULD use | ||
| the term `Extended 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.
What does "use the term" means? Moreover, why would we use a term that is not defined anywhere else?
|
It is unclear what problem this PR is trying to solve. Consider creating an issue and follow the instructions https://github.com/open-telemetry/opentelemetry-specification/blob/main/CONTRIBUTING.md#proposing-a-change |
|
When we look at how SDKs should embrace complex attributes on Logs there are multiple options, and it would be beneficial to the ecosystem if there is some degree of alignment across SDKs. Much of this alignment just comes down to having consistent names to refer to things across languages. Here are two options below. It would be great it if folks who support some other option can comment and briefly explain their preference. 1. Change standard attributes to include complex attributesIt sounds like this is what the Collector has done, but it contradicts existing specification language. I believe @lmolkova and I both support this approach but there hasn't been enough spec support to explore overturning the existing language. 2. Introduce the concept of "Extended attributes" which is a superset of standard attributes and complex attributesThis is what this PR is aiming for and is what the Java SIG prefers (see prototype). As @jack-berg says in slack
|
@pellared what is the Go SIG's preference? can you summarize here so we can add it to the above options that we are considering? |
I think we are in the same boat. From the comment I referenced to:
Basically the result of #3858 made us define attributes as a separate type: https://pkg.go.dev/go.opentelemetry.io/otel/log#Value. I think that the same happened for Rust: https://github.com/open-telemetry/opentelemetry-rust/blob/a071d8fc3906da56e089061927fbc1561e0e7677/opentelemetry/src/logs/record.rs#L61-L87 CC @cijothomas |
.NET kind of did this as well as the attribute value can be anything ( |
to add a practical aspect to the #4462 (comment) If you take a look at the Python PR that attempts to implement support for extended attributes - open-telemetry/opentelemetry-python#4342 (comment) or similar Java PR - open-telemetry/opentelemetry-java#7123, both try to find the API name for this new thing (non-standard attributes) and they came up with two different names - A few SDKs (and collector) support extended attributes on the API surface already, so they don't necessarily have this problem. The rest of SDKs would need to align on the name. To echo others: I would prefer to have one |
When wearing the "OTel Spec Sponsor" hat: 3. Having "Extended attributes" only in Logs (and these could be named Log Attributes)
If there were so many pushbacks from having one From #3858 description:
I think that we have the exact same uncertainty for future signals and adoption of extended attributes. Personally, I see adding a new "extended attributes" type as a hack for a possibly bad decision we have taken. If there was a preference by the community that want to have the attribute types limited then we should support the "extended attributes" only for the Logs (for compatibility with existing logging systems). If we want to "follow" the Collector design (which is also a preference of some part of the community) then we should simply extend the existing standard attributes type... However, given:
I am not sure what the community would think about the project if we change the decision. Also from #3858 (comment):
If we would like to change our decision then we should not take it lightly... Probably we should make some OTEP, user surveys, prototypes etc... Side notesI think that @tigrannajaryan was right here: #3858 (comment). I approved the PR as I just wanted to have "some decision" to move the OTel Go Logs API implementation further... When I am wearing the "OTel Go Maintainer" hat then I would like the standard attributes to be extended. |
|
If we use Also, while the spec language is somewhat restrictive, all past discussions showed that we don't want to close the door for extended attributes on spans and see a lot of use for them in semantic conventions. Let's imagine the evolution in this direction:
There is no future evolution scenario that would need |
I do agree with the perception, but I don't think we should declare something breaking without leaving some proof of why and how it is breaking. And if we can prove it can be changed in non-breaking manner, we should consider this language a bug. Update: I'm also worried about the perception if we stick to technically problematic decisions only because of a note like this. |
|
A keep-the-status-quo solution for the practical problem could be that SDKs decide how to support it:
|
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
|
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
|
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Changes
Document that
Extended Attributeterm should be used to represent an extended set of standard attributes (if introduced by SDK).This leaves the door open for reusing the same type on other signals and helps to align the type name across implementations.
See Java prototype: open-telemetry/opentelemetry-java#7123
CHANGELOG.mdfile updated for non-trivial changesspec-compliance-matrix.mdupdated if necessary