Skip to content
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

Enrich Gauge API #106

Open
mgkanani opened this issue Jun 26, 2019 · 0 comments
Open

Enrich Gauge API #106

mgkanani opened this issue Jun 26, 2019 · 0 comments

Comments

@mgkanani
Copy link

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

mgkanani pushed a commit to mgkanani/tally that referenced this issue Jun 29, 2019
mgkanani added a commit to mgkanani/tally that referenced this issue Jun 29, 2019
mgkanani added a commit to mgkanani/tally that referenced this issue Jun 29, 2019
mgkanani added a commit to mgkanani/tally that referenced this issue Jun 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant