-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
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:
- 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
Metadata
Metadata
Assignees
Labels
No labels