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

fix: use counter instead of gauge for metrics that only increase over time #3355

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chaitanyaprem
Copy link
Contributor

Description

Noticed that gauge is being used for metrics that increase over time like number of msgs received/pushed etc.
Aligning them as per definitions https://prometheus.io/docs/concepts/metric_types/

@chaitanyaprem chaitanyaprem changed the title fix: use counter for metrics that only increase over time fix: use counter instead of gauge for metrics that only increase over time Apr 2, 2025
Copy link

github-actions bot commented Apr 2, 2025

You can find the image built from this PR at

quay.io/wakuorg/nwaku-pr:3355

Built from 7c17b77

Copy link
Contributor

@gabrielmer gabrielmer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much!

Copy link
Contributor

@NagyZoltanPeter NagyZoltanPeter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the grafana panels work without change upon this?

@chaitanyaprem
Copy link
Contributor Author

Will the grafana panels work without change upon this?

unless they are using some special property assuming gauge they should work the same.
Because i had a time-series panel which was using gauge and had no impact when changed to Counter.
Any specific issue do you forsee?

@chaitanyaprem
Copy link
Contributor Author

I am not able to understand why lint is failing.
is there something i need to run locally to figure out what is the issue?

@NagyZoltanPeter
Copy link
Contributor

NagyZoltanPeter commented Apr 2, 2025

Will the grafana panels work without change upon this?

unless they are using some special property assuming gauge they should work the same. Because i had a time-series panel which was using gauge and had no impact when changed to Counter. Any specific issue do you forsee?

I think counters in prometheus will be postfixed by _total all those gauge names must be changed in the boards to refer them as <metric_name>_total.
But correct me if I'm wrong.

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

Successfully merging this pull request may close these issues.

3 participants