-
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
Use UCUM units in Metrics Semantic Conventions #2199
Use UCUM units in Metrics Semantic Conventions #2199
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While ms is easily understood, By for bytes is much worse for readability. Also, why 1 in one case and {count} in others?
Looks good, except for the quesiton around |
I agree. This is not really optimal in terms of readability. However, the System Metrics Semantic Conventions already use this notation. One possible solution would be to add another column for UCUM units.
For some I used
Yes, On the UCUM site, this example is provided:
|
Personally, I don't like this change. I've never heard of UCUM before. It's home page says 'has already been adopted by some standard organizations such as DICOM, HL7" - great, never heard of those either. So why choose this specific notation? But more importantly, the wikipedia says "Its primary purpose is machine-to-machine communication rather than communication between humans". What is the value of using it in the spec that is supposed to be human readable? |
As far as I am aware, the choice of adopting UCUM in the General Metric Semantic Conventions was made to keep naming consistent and is a carry-over from OpenCensus, where UCUM was used in in the Specification as well. ([1], [2], [3]) I would be open to change this to include a column for the UCUM-compliant unit, which would both avoid ambiguity and follow the recommendation in the General Metric Semantic Conventions. Another option of course would be to drop this recommendation from the General Metric Semantic Conventions altogether. |
UCUM is already a recommended by this spec and by OTLP spec. I think this PR adds precision to the semantic conventions and it is a desirable improvement (unless we somehow want to get rid of UCUM altogether) if we can ensure we don't make the readability worse. Perhaps we add an extra column to show the human readable version of the unit or maybe include the unit in the description, e.g. change: |
Thanks for the feedback! I added a human-readable version to the description as @tigrannajaryan suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure we should duplicate the unit in the description like this. The descriptions and units are actually carried over the wire when we report metrics.
I see. You're right, having redundancy like that does not make sense when the description is also carried over the wire. I will update the PR to introduce another column. |
This is a good point. I totally forgot the description is also on the wire. I withdraw my suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
439d665
to
9d07f5d
Compare
As outlined in #2186 and #1794, the General Metric Semantic Conventions suggest that UCUM units should be used.
This PR addresses this by changing the Units in
specification/metrics/semantic_conventions/faas-metrics.md
specification/metrics/semantic_conventions/http-metrics.md
specification/metrics/semantic_conventions/rpc-metrics.md
to these UCUM-compliant units while still retaining the original semantics.
Resolves #1794, resolves #2186