Skip to content
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

Merge the kv and labels packages #1052

Closed
MrAlias opened this issue Aug 11, 2020 · 5 comments · Fixed by #1060
Closed

Merge the kv and labels packages #1052

MrAlias opened this issue Aug 11, 2020 · 5 comments · Fixed by #1060
Assignees
Labels
pkg:API Related to an API package

Comments

@MrAlias
Copy link
Contributor

MrAlias commented Aug 11, 2020

The kv package contains definitions for keys, values, and their combined key-values with some functionality around their creation and transformations. The label package contains interaction and set functionality around the kv package. Merging these packages into a unified label package would organize related code into a single import and remove the inherent coupling between the packages.

This would also resolve #1010

@MrAlias MrAlias added the pkg:API Related to an API package label Aug 11, 2020
@MrAlias
Copy link
Contributor Author

MrAlias commented Aug 11, 2020

Moving the combined package to the top level directory of the repository would also make this a part of #964.

Additionally, this work should also include updating documentation for the package. The existing package and exported object documentation for both of these packages needs improvement to help new users.

@seh
Copy link
Contributor

seh commented Aug 18, 2020

One thing that confuses me—perhaps due to ignorance of the OpenTelemetry specification—is that we now have the word "label" applied to "attributes". Is the label what was previously called the attribute key, or the label a key together with a value? If it's the former, are "key" and "label" synonyms? If it's the latter, are "attribute" and "label" synonyms?

@MrAlias
Copy link
Contributor Author

MrAlias commented Aug 18, 2020

One thing that confuses me—perhaps due to ignorance of the OpenTelemetry specification—is that we now have the word "label" applied to "attributes". Is the label what was previously called the attribute key, or the label a key together with a value? If it's the former, are "key" and "label" synonyms? If it's the latter, are "attribute" and "label" synonyms?

It's the latter (a label is a key-value pair), "attribute" and "label" are synonymous. Attributes are used in the tracing specification (though have recently been moved to a "common" part of the specification) and labels are used in the metric specification.

I agree this is not ideal.

@seh
Copy link
Contributor

seh commented Aug 18, 2020

Thank you for the clarification. Are you aware of any motion (even rejected) to unify those terms? I recognize that would yield yet more churn in the code. The current state comes after several big moves, but it's still muddled.

@MrAlias
Copy link
Contributor Author

MrAlias commented Aug 18, 2020

Thank you for the clarification. Are you aware of any motion (even rejected) to unify those terms? I recognize that would yield yet more churn in the code. The current state comes after several big moves, but it's still muddled.

There was an old conversation in the specification SIG around this issue that was left with the different names being left as is (IIRC this was because no resolution could be reached and it was the default).

However, in this repository I've wondered if we can do better. I have a lot of thoughts on possible approaches, but I think they are better suited for a new issue: #1069

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:API Related to an API package
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants