-
Notifications
You must be signed in to change notification settings - Fork 897
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
Proposal: Remove Gauge instrument #412
Comments
I support this, but only weakly. I wonder if anyone is strongly opposed. I looked for examples where a Gauge metric would be used (not MUST be used) instead of an Observer metric. The one example that sticks out are situations where in a concurrent environment, an Observer gauge is likely to hit a lock and block collection. When optimizing this scenario, we end up in a "don't call me, I'll call you" situation. We'd like to set metrics at a time when the lock is not contended. Often this means managing your own state and delaying updates until the time is right to record them. At this point, calling Set() is natural. However, you could address this by building on top of Observer instruments. Each Settable-gauge would be backed by one Observer and a last-value. What we potentially lose is an ability to feed these events into other aggregators using a dynamic configuration--but this seems unlikely to matter. On the opposing side, I feel that the arguments about query support (needing a Sum vs a LastValue) are not bulletproof. Using Observer instruments will encounter the same trouble. The difference, I guess, is that we may assume that all label combinations are set in a single collection period for an Observer, therefore the range of time and label values covered by a Sum aggregation is well defined. I believe it boils down to advice that: if you will pre-aggregate an observer (or gauge) instrument, be careful and know what you are doing. I see this as an improvement. It will be nice to be rid of Monotone non-observer gauge logic. |
I've written up the rationale that I came to while thinking this through and posted OTEP 80. |
I also think this is a good change. I suspect we'll end up adding it back eventually, but I also like having a concrete example to justify it. @jmacd Your example is very abstract. Can you provide a concrete example from your experience where you ran into this? |
I added a lot more text based on early feedback. Thanks and PTAL. |
This was accepted. |
During the last metrics specs meeting we discussed the option to remove from the API the Gauge instruments and the LastValue aggregation support, here are some of the reasons:
Please provide examples when a Gauge metric MUST be used instead of the Observer or Measure and explain the use-case.
The text was updated successfully, but these errors were encountered: