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

Feature(new_metrics): make the counter increment monotonically #951

Closed
Tracked by #922
empiredan opened this issue Apr 19, 2022 · 0 comments
Closed
Tracked by #922

Feature(new_metrics): make the counter increment monotonically #951

empiredan opened this issue Apr 19, 2022 · 0 comments

Comments

@empiredan
Copy link
Contributor

In #931 we've implemented the counter that can both increase and decrease. However, in Prometheus a counter can only increase monotonically. If the counter decreases, functions of Prometheus such as rate() and increase() cannot be used to compute QPS and "recent" count.

In consideration of the problem, this kind of counter is moved to the gauge. Therefore, the gauge is added with increment() and decrement() functions, which can only be used for integral types.

@empiredan empiredan changed the title Feature(new_metrics): make the counter monotonic Feature(new_metrics): make the counter increment monotonically Apr 19, 2022
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