-
Notifications
You must be signed in to change notification settings - Fork 896
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
The direction
attribute does not comply with the naming guidelines in the spec
#3129
Comments
Semantic conventions for System, Runtime Environment and Process use these attributes without prefixes:
Semantic conventions for hardware simply follow the same pattern and ensure consistency for this attribute and its possible values, as recommended by the general guidelines for metrics semconv. My advice is that we must update the specification for attributes naming. While it is critical to have unique attribute names for Resources, it should not be mandatory for metric attributes. Metric attributes are defined in the scope of a given metric (in OpenTelemetry) and there is no possible conflict of 2 attributes with identical names from 2 different metrics. Having If we can avoid prefixing everything as if it were Java class names, it will make everybody's life much easier too, and save some storage space as well ;-) |
Thanks. If that's the case, then yes the specification for attributes naming should be updated. This would apply to #3131 as well. Given that the spec explicitly states attribute names must be hierarchical, one could wrongly assume metric attributes do not have name collisions across metrics. This could be a problem when exporting metrics and their attributes to an external database. The spec could explicitly state the names of metric attributes are unique within the scope of a metric. |
Presumably the spec would also have to state something about naming conventions for attributes defined in the spec itself versus attributes defined by other organizations. Someone could create metric-level attributes with common words or contractions such as |
Thank you for the clarification.
I thought the specification allowed for extensibility? I.e., a per-metric attribute can be defined in the specification, and a vendor may also define custom attributes. At least this is how I understood the recommendation to use hierarchical names. A hierarchical name such as Shouldn't there be a way to ensure there is no possible collision between custom attributes and standard attributes? |
Looks like this issue is resolved now. |
We feel that this has been addressed, if you feel differently, leave a comment and we can reopen the issue, @sebastien-rosset |
What are you trying to achieve?
Either:
direction
attribute so that it's compliant with the naming guidelines.direction
.What did you expect to see?
I was expected the OpenTelemetry spec to be self-consistent with naming conventions, in particular that the
direction
name is hierarchical.Additional context.
The spec states the instrument should have attributes for direction; oddly, plural is used, which implies there could be more than one attribute for direction, but without explaining why plural makes sense. Further, that sentence is not stating the attribute should be named
direction
, but elsewhere it was interpreted as a literal requirement, i.e., the name of this attribute ISdirection
.Using the name
direction
breaks some of the semantic rules listed in the spec:One issue is that another namespace could have a different concept of "direction" such as up, down, or East, West, left, right, etc. For example a vane anemometer could have a direction attribute which reports wind direction in degrees or cardinal direction. Perhaps for I/O the attribute should be named
hw.io_direction
.In addition, the spec states:
Defining attributes with no name hierarchy has the side effect of preventing any future use of that word as a namespace.
The text was updated successfully, but these errors were encountered: