-
Notifications
You must be signed in to change notification settings - Fork 870
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
[Metrics] Measure.absolute vs Gauge/Counter.monotonic #364
Comments
Moved from PR discussion in JS SIG: IMO absolute and monotonic don't mean the same thing at all. absolute means non-negative, monotonic means only counts up. An absolute, non monotonic measure may measure something like disk usage which can go up and down but never be below zero. |
The sum of an absolute measure is monotonic, but these terms definitely have different meaning. I would be happy to leave this open and try to improve the explanation of these terms. |
I still think they both should be in there. It seems to me monotonic implies absolute, but absolute does not imply monotonic:
Unless I am misunderstanding something. |
I am fine with both being in there. My issue is that each metric type only takes 1 of these options and so I am wondering if it would make sense to rename them s.t. the meanings are all merged (if such a word exists!), e.g. |
In the exporter interfaces for the Go SDK we use the term "Alternate" to describe the alternate behavior for each kind of instrument. It can't strictly be defined as "allow negatives" without contortions, saying e.g., that it refers to the change of a gauge but to the value of a counter and a measure. I recognize the cognitive trouble here, but I don't think consolidating on "monotonic" or "allow negatives" is really better. I'm open to a magical word that does better than "Alternate" though. |
I understand the motivation to consolidate into a single I would argue for the increased readability and understandability of the interface to have both flags. |
I accept. This update will go into the SDK specification, since this is a matter related to the export interfaces. The currently open PR #347 is in flight, I will continue to work on it. |
These options were written out of the v0.3 specification. |
From: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/api-metrics.md#measure
Currently
monotonic
andabsolute
accomplish almost the same things, but have different names based on if used in a Gauge/Counter or in a Measure. Could their naming be converged to reflect their overall similarities? E.g. removeabsolute
and usemonotonic
for all 3, or vice versa? Otherwise could we add some clarification on how they are different and are kept separate?The text was updated successfully, but these errors were encountered: