-
Notifications
You must be signed in to change notification settings - Fork 164
Remove the Metric Gauge instrument, recommend use of other instruments #80
Remove the Metric Gauge instrument, recommend use of other instruments #80
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.
The reduction of API surface in this change is counterbalanced by requiring more work from the user, which makes migration to OTel more difficult. I would not be in favor of removing support for sync calls.
However, I notice that you're not extending the argument to Measure instrument. As discussed offline, I'm not clear on the difference between Measure and Gauge, and I would actually prefer to see Measure removed as more ambiguous. Gauge simply captures an observation as raw number. Traditional last-write-wins behavior can be an aggregation option.
@yurishkuro Thank you. I rewrote large parts of this document to address some of the points you raised. I have tried to argue that one of the other three instrument kinds is always appropriate. If I understand your position on Gauge vs. Measure, I think it's overly reductive to say that Measure could be replaced by Gauge, but I agree that Gauge can be replaced by measure in some cases and that there's not an additional burden for migration in all but the rarest cases. These rare cases are cases where Observer instruments are truly the right choice and Counter and Measure would not apply, but that the performance impact of a callback approach is not acceptable. In the new text, I've tried to clarify the distinction between Observer and the other kinds of instrument, that of there being a "current set of measured values" across multiple label sets without reference to an interval of time. |
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.
LGTM, and the examples are very helpful.
I can still be convinced not to go with this proposal, but I'm definitely leaning towards it now. Thinking about how to implement the |
Measure is absolutely needed. Measure, through attaching aggregations, can cover Counter and Gauge, but not the other way around. I still see Counter and Gauge (Observable or not) as optimizations, which I like. OpenCensus there was only But I'm +1 on removing the Gauge instrument. Easy to add it it back if needed. |
This OTEP does a good job highlighting why it is advantageous to remove gauges from the developer perspective. However, one of the things that is really important in building out an API is to consider the user of the API and the APIs lifecycle. As @bogdandrutu pointed out in open-telemetry/opentelemetry-specification#412:
I think this is an understated point, but one that should be central to this discussion. Including Gauges in the API to only later in the lifecycle determine their meaning needs to change (how they support complex aggregations), or they need to be removed, is a bad design decision and one that will reflect poorly on the OpenTelemetry project overall. @yurishkuro does bring up a valid point in questioning whether the lack of Gauges would result in a loss of functionality to the final user, but I think @jmacd and @tsloughter are correct in providing reasons as to why this is not the case. I'm in favor of removing the Gauge from the API if we cannot come up with any valid use-cases for them. @jmacd do you think adding a bit about the API design choice to the motivation a needed part of the OTEP? |
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.
Love the examples, I think they are sorely missing in general in the Spec for metrics.
@open-telemetry/specs-approvers please review, we need couple more reviews to merge this |
open-telemetry#80) * Remove the Metric Gauge instrument, recommend exclusive use of Observer instrument * Typos * More text Co-authored-by: Bogdan Drutu <lazy@splunk.com>
open-telemetry#80) * Remove the Metric Gauge instrument, recommend exclusive use of Observer instrument * Typos * More text Co-authored-by: Bogdan Drutu <lazy@splunk.com>
open-telemetry#80) * Remove the Metric Gauge instrument, recommend exclusive use of Observer instrument * Typos * More text Co-authored-by: Bogdan Drutu <lazy@splunk.com>
open-telemetry/oteps#80) * Remove the Metric Gauge instrument, recommend exclusive use of Observer instrument * Typos * More text Co-authored-by: Bogdan Drutu <lazy@splunk.com>
This was discussed in the 1/16 Metrics SIG meeting. This was first filed as open-telemetry/opentelemetry-specification#412