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

Ability to explicitly set the counter value? #618

Open
MA-MacDonald opened this issue Mar 10, 2024 · 1 comment
Open

Ability to explicitly set the counter value? #618

MA-MacDonald opened this issue Mar 10, 2024 · 1 comment

Comments

@MA-MacDonald
Copy link

Is there a way to explicitly set the counter value besides the increment function?

I have a service that gets it data from an external API which already returns the incremented count value.

After reading the docs the only option I see would be to reset the counter every time I record the new value.

I guess it's similar to this past Issue.
#534

It feels wrong to use a Gauge since its technically a count metric but i guess I don't fully know the implications of using the incorrect metric type or if it really matters?

@pradig
Copy link

pradig commented Apr 29, 2024

Same problem here, my underpinning value is a monotonic increasing value, but I do not get the increments, just the new value. I would to set() it, not to inc() it.

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

2 participants