Closed lmolkova closed 3 months ago
Code generator generates the same attribute name constant for attribute.name and attribute_name. As a result, if attribute is renamed (_ is changed to . or vice versa), the value of attribute changes, but the name stays the same.
attribute.name
attribute_name
_
.
It's ambiguous - see https://github.com/open-telemetry/semantic-conventions/issues/1031 and https://github.com/open-telemetry/semantic-conventions/issues/1118 for the discussion.
Based on https://github.com/open-telemetry/semantic-conventions/issues/1118, the semconv recommendation would be to:
This PR demonstrates the result of such naming policy change.
Code generator generates the same attribute name constant for
attribute.name
andattribute_name
. As a result, if attribute is renamed (_
is changed to.
or vice versa), the value of attribute changes, but the name stays the same.It's ambiguous - see https://github.com/open-telemetry/semantic-conventions/issues/1031 and https://github.com/open-telemetry/semantic-conventions/issues/1118 for the discussion.
Based on https://github.com/open-telemetry/semantic-conventions/issues/1118, the semconv recommendation would be to:
_
when generating any constants in the code (fields, methods, class names, etc)_
This PR demonstrates the result of such naming policy change.