You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, Gauge API has only one method i.e. Update(float64)
It has limitation like user have to perform calculation and then use Update.
E.g.
To report currently total number of request in progress/queue with server. One has to create a variable which increases on every new req and decreases on request out. On top of updating variable, we also have use gauge.Update to have right metric value.
This is an overhead. Consider the same situation with use of tags/labels. User of the library have to right more code and also it is error prone.
It would have been easier if Gauge allows below methods on top of Update:
Add(val float64) // increments cur value by val
Sub(val float64) // decreases cur value by val
Above functions are already supported by prometheus client metrics library.
I would like to contribute for this.
Thanks,
Mahendra
The text was updated successfully, but these errors were encountered:
mgkanani
pushed a commit
to mgkanani/tally
that referenced
this issue
Jun 29, 2019
Hi,
Currently, Gauge API has only one method i.e. Update(float64)
It has limitation like user have to perform calculation and then use Update.
E.g.
To report currently total number of request in progress/queue with server. One has to create a variable which increases on every new req and decreases on request out. On top of updating variable, we also have use gauge.Update to have right metric value.
This is an overhead. Consider the same situation with use of tags/labels. User of the library have to right more code and also it is error prone.
It would have been easier if Gauge allows below methods on top of Update:
Above functions are already supported by prometheus client metrics library.
I would like to contribute for this.
Thanks,
Mahendra
The text was updated successfully, but these errors were encountered: