-
Notifications
You must be signed in to change notification settings - Fork 893
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
Consistently format semantic convention enums #1519
Comments
We decided to take the next steps to provide some consistency here in the SIG meeting. Each language has their own idiomatic way to define constants. Given the different capitalization rules, it's important to be able to have a delimiter for keys that contains more than one word. I propose us to use all lower case with "_" and rely on autogenerators to produce idiomatic constant identifiers. For example, "infrastructure_service" can be autogenerated to:
|
* Have consistent formatting for semantic convention enums Currently, semantic convention enum values are not consistent. For example, os.type values are all capitals whereas cloud.infrastructure_service values are underscored lowercase. This change improves the inconsistencies. We also expect language implementations to autogenerate code from enum values. Each language has their own conventions for constant variable identifiers and we expect the consistent formatting is going to help the language implementors. Fixes #1519.
I'm reopening this, since we have this problem again now. See open-telemetry/build-tools#59. Evidently, we also need to enforce this with our tooling somehow (out of scope for this issue). |
…try#1598) * Have consistent formatting for semantic convention enums Currently, semantic convention enum values are not consistent. For example, os.type values are all capitals whereas cloud.infrastructure_service values are underscored lowercase. This change improves the inconsistencies. We also expect language implementations to autogenerate code from enum values. Each language has their own conventions for constant variable identifiers and we expect the consistent formatting is going to help the language implementors. Fixes open-telemetry#1519.
Semantic convention enums currently have inconsistent formatting. For example,
os.type
values are all capital (https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/resource/os.yaml#L10) whereascloud.infrastructure_service
values are underscored lowercase (https://github.com/open-telemetry/opentelemetry-specification/blob/main/semantic_conventions/resource/cloud.yaml#L45).With the new requirement of autogenerating the semantic conventions, formatting in the YAML files is important for the code generator developers. Bless a format and consistently use it everywhere.
The text was updated successfully, but these errors were encountered: