-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[pdata] Revisit ValueType.String() output #6249
Comments
One more enum that we don't do this is Update: an argument can be made that the enums defined in the proto have the String method as the proto string representation, but we don't do that for other places like |
Makes sense. I'm looking into how the |
Please open a different issue about enums defined in the proto file. The enums Type defined by us are consistent now. |
Also make sure we look at all of them and we come up with the rules |
Sounds good. Closing this issue in favor of #6251 |
The output of the ValueType.String() is inconsistent with other similar methods. It has 2 issues:
Val
suffix ofValue
methods #6081, all the string value identifies were consistently renamed toStr
. The short nameStr
is chosen instead ofString
in order to avoid unintentionally implementingfmt.Stringer
interface by string typeValue
getter. Output ofValueType.String
for string type is stillSTRING
which is inconsistent with other types:pcommon.ValueType.String
has been generated by uppercasing type identifiers while other similar methods return identifies as e.g.:Suggestion is to change
ValueType.String()
output to return the string representation of corresponding type identifiers:It means we choose consistency over readability ("Str" instead of "String"). I believe it's ok given that we already return "BOOL" not "Boolean" for ValueTypeBool, but I'm open for any other suggestions.
cc @open-telemetry/collector-approvers
The text was updated successfully, but these errors were encountered: