-
Notifications
You must be signed in to change notification settings - Fork 890
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
Is direction dimension a mistake in semantic conventions? #2589
Comments
@tigrannajaryan does the aggregation not represent "total" bytes send/received over the network? Is that not meaningful? |
Yes, probably meaningful for network (e.g. total bytes/throughput can be interesting to know as a percentage of bidirectional bandwidth available for half-duplex physical connections). Is it also meaningful for disks? I am not sure what's the meaning of total combined bytes written and read for disk. Sure, both are bytes flowing from/to the same device, maybe that's useful somehow? I am not against keeping the |
Speaking specifically to @reyang's example, it would appear that aggregating read/writes/other would be meaningful as per the following description of "I/O other bytes" :
|
I believe
I consider this a good exception to the rule otherwise given by Prometheus quoted above:
The issue about directional transfers tests this rule: we are able to find ways that the sum() of network traffic is meaningful and even useful. The usefulness/meaningfulness needs to be weighed against potential harm due to "uselessness". If we believe "usually you care about only one of them at a time", and we believe the common mode of viewing metrics is to aggregate them, there's real harm in having a direction label as it will obscure two useful things in a commonly-useless way. Is there an underlying logic we can use for similar situations? Here's one answer: in what sense are network bytes read and written the same? In what sense are they different? It makes sense to sum() or rate(sum()) these counters when they are the same, and it does not make to sum() or rate(sum()) these counters when they are not the same. Of course, a byte is a byte, so the sum is meaningful (units are "By"). However, if a metric is being used as a proxy variable for load -- and the load induced by a byte read is different than the load induced by a byte written, then it is harmful/useless to combine them (units are "{bytes_read}" and "{bytes_written}"). |
At least we should start by addressing this with upstream metrics addition (and yes, later on update the existing ones ;) ) |
This PR looks to address the concerns voiced in open-telemetry#2589. It adds new metrics that include the direction in their names, and marks existing metrics as deprecated. Fix open-telemetry#2589
I have mixed feelings about this. If you take the network traffic example, you can calculate the bandwidth utilization with something like: I don't see how we could calculate the same bandwidth utilization metric from Also, as noted by @reyang, having separate metrics is reasonable when you have a strictly defined set of dimensions. It does fit well with network (receive vs transmit), but doesn't even for a simple metric like Last point: What are the drawbacks of using a direction attribute versus a separate metric? As explained above and by others, there are a few minor benefits of using the direction attribute, but I can't see anything in the "cons" column. Performance? Readability? Consistency? |
This change will require changes in 7 receivers for consistency:
|
During the Aug. 16th, 2022 Specification SIG meeting, there were discussions about network metrics - based on the comment here folks believe that Disk I/O should NOT have a dimension/attribute called Here are what I've found so far about Windows operating systems (NT kernel based):
|
Shouldn't |
@sebastien-rosset I don't see a reason to use a specific attribute for hardware metrics. |
The spec states the instrument should have attributes for direction; oddly, plural is used, and it's not stating the attribute should be named
That would also break the semantic rules:
Perhaps it should be In addition, the spec states:
Defining lots of attributes with no name hierarchy has the side effect of preventing any future use of that word as a namespace. Currently, I can see these attributes are declared with a flat naming structure:
Under the semantic guidelines, HTTP, RPC, Database, System, Process, Runtime Environment, FaaS are consistently using hierarchical names (with Out of curiosity, I looked at all the possible values for
|
I created #3129 since it's a different issue |
We have metrics that have a "direction" attribute, for example disk metrics.
This seems to be in contradiction to the general guidelines about attributes
I am not sure what aggregation is meaningful for "direction" attribute.
Should the attribute be removed and the metrics split into 2, one for read and one for write?
It does look pretty natural to express this dimension as an attribute, it is low cardinality, it groups 2 very related measurements. Is this an indication that the guidelines need to be adjusted or this is an exception from the rule? Or perhaps there is a meaningful aggregation of "direction" that I just don't see?
The text was updated successfully, but these errors were encountered: