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

Counters, gauges and histograms init with zero values #44

Open
EdgarSedov opened this issue Mar 9, 2021 · 3 comments
Open

Counters, gauges and histograms init with zero values #44

EdgarSedov opened this issue Mar 9, 2021 · 3 comments

Comments

@EdgarSedov
Copy link

EdgarSedov commented Mar 9, 2021

Atm u can't create histogram with zero value upfront (for correct grafana increase function to work), because it will increment _count and mess with averages in future. It would be nice to have initialization mechanics (for example, on register method), as discussed in other clients, like here or here

I'm not that good at redis and lua, i've looked into current updateSomething realizations for redis and couln't come up with solution, but if u'll point me in right direction, i think i can try to help

@LKaemmerling
Copy link
Member

Hey @EdgarSedov,

good point! I already looked a bit into the code and I don't think this is easy solvable. The "problem" is that we only set the value/metric when you call inc/set/observe on the specific metric types. Before it does not "reach" the underlying storage and will be "thrown" away. I will think about it a bit more, but I think we can not fix it with the current architecture for this library.

@EdgarSedov
Copy link
Author

@LKaemmerling Hi' i've made a draft with possible solution, please take a look when u'll have some time

@jaugustin
Copy link

@LKaemmerling is there any plan on this ? I saw the PR didn't move since 2 years ?

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

3 participants